Lab 7 Grading Guide

Question 1

To earn a Success:

  • states the number of rows in the data frame

If they use group_by()

Careful! We don’t need to make any groups to know how many penguins are in these data! We only need to know the number of rows in the dataset!

If they use something other than glimpse() or nrow()

Technically, this function doesn’t tell you the number of rows / observations in the dataset, which is what we need in order to know the number of crabs in the dataset.

Question 2

To earn a Success:

Creates scatterplot with:

  • latitude on x-axis
  • size on y-axis
  • y-axis label includes units for size (millimeters)
Note

They are not required to include a regression line, but if they do, great!

If they don’t have axis labels with the units:

It is important to include an axis label stating what the units of each variable are! If you are wondering what the units of crab size are, you can look up the help file (using ?pie_crab)

Question 3

To earn a Success:

Description includes all of the following:

  • form of relationship (linear)
  • direction of relationship (positive)
  • strength of relationship (moderate)
  • location of any outliers

If they forget one of these:

Careful! You were asked to describe the form, direction, strength, and unusual points for the plot. Remember, it is important to explicitly state where you believe the outliers are, so the reader knows where to look! I would also encourage you to justify why you believe this is an outlier, since other people might not think so!

If they don’t state where the outlier is:

It is important to explicitly state where you believe the outliers are, so the reader knows where to look! I would also encourage you to justify why you believe this is an outlier, since other people might not think so!

Question 4

To earn a Success:

Code should look like the following:

obs_slope <- obs_slope <- marsh_info %>% 
  specify(response = size, 
          explanatory = latitude) %>% 
  calculate(stat = "slope")

Question 5

To earn a Success:

Code should look like the following:

null_dist <- pie_crab %>% 
  specify(response = size, 
          explanatory = latitude) %>% 
  hypothesize(null = "independence") %>% 
  generate(reps = 500, 
           type = "permute") %>% 
  calculate(stat = "slope")

If they chose reps larger than 500, that’s okay!

If they chose reps smaller than 500:

Careful! How many resamples (reps) were you asked to generate?

Question 6

To earn a Success:

Code should look like the following:

get_p_value(null_dist, 
            obs_stat = obs_slope, 
            direction = "two-sided")

If they don’t specify "two-sided":

Careful! How many tails are there in a “standard” hypothesis test for the slope?

Question 7

To earn a Success: States they reject \(H_0\) because the p-value is less than 0.1

If they do not state whether they reject or fail to reject \(H_0\):

You were asked to make a decision regarding the hypotheses, which has two possible options. Which option do you choose and why?

If they say they fail to reject \(H_0\):

Careful! What p-value did you get? Was it smaller than the alpha I specified? The alpha stipulates how “unusual” the observed statistic needs to be in order for us to reject the null hypothesis. Is your p-value smaller than this threshold?

Question 8

To earn a Success:

  • Conclusion is consistent with your decision
Conclude the null is wrong

If their conclusion says “we have evidence against there being no relationship”

Careful! Your conclusion tells me what you believe is not true about the relationship between these variables. It would be nice if you told me what you believe is true!

If they made the incorrect decision in Question 7:

Your conclusion should change based on your revisions to Question 7. In general, we should always make conclusions in terms of the alternative hypothesis!

If their conclusion says that there is insufficient evidence that the variables are related:

Think back to what the null and alternative hypotheses are for linear regression! If you decided to reject the null, what should you conclude about the relationship between these variables?

If they conclude there is a positive relationship:

Think back to what the “standard” null and alternative hypotheses are for linear regression! What type of relationship are we testing for?

If they interpret the p-value but don’t make a conclusion:

You provided a really great interpretation of what the p-value means, but you have not told me what the p-value would lead you to conclude! What should you conclude about the relationship between these variables?

Question 9

bootstrap_dist <- pie_crab %>% 
  specify(response = size, 
          explanatory = latitude) %>% 
  generate(reps = 500, 
           type = "bootstrap") %>% 
  calculate(stat = "slope")

If they chose reps larger than 500, that’s okay!

If they chose reps smaller than 500:

Careful! How many resamples (reps) were you asked to generate?

Question 10

To earn a Success:

Code should look like the following:

get_confidence_interval(bootstrap_dist, 
                        level = 0.90, 
                        type = "percentile")
"percentile" is the default

So, it is okay if they don’t specify it!

If they use a level other than 0.90:

Look back at the lab instructions, what percentage confidence interval were you asked to construct?

Question 11

To earn a Success:

The interpretation must state:

  • confidence: they are 90% confident
  • statistic: the slope between crab size and latitude
  • population: for all marshes along the eastern US
  • interval: is between [lower bound] and [upper bound]
Note

Note that every group will get a different interval, due to the randomness of bootstrapping!

If they don’t state their confidence:

How much confidence do you have in your interval?

If they don’t state the statistic in context:

We need to be specific about the what parameter we believe is in our interval. The slope statistic is measuring the relationship between which variables?

If they don’t include a population:

What population does this interval apply to? Where were these crabs sampled from? That is the population your interval applies to!

Question 12

To earn a Success:

  • Say “yes” Bergmann’s rule applies

  • Because the confidence interval is positive

If they say “yes” because the slope is positive:

Technically, it is possible for a slope to be positive but have the confidence interval overlap 0. What values are included in your confidence interval? What does that imply about plausible values for the population slope?