8  Exam 2 Practice

Author

Melissa Wuellner, Jacob C. Cooper

Please complete the following problems as practice for Exam 2. Note that you may need to load specific packages from the previous exercises to get your code to work.

All questions must be answered in full sentences.

Example answers: For your conclusion, answers should look like this:

The mean height of the class is significantly higher than the height of the general population ($Z$ = 2.50, \(p = 0.006\)).
The mean length of the leg of the high-elevation Woodhouse’s Toads (Anaxyrus woodhousii) is indistinguishable from those of the general population (\(Z = 0.12\), \(p = 0.45\)).

8.1 Minnows

Consider this scenario: You have discovered a never-before-documented population of minnow in the Kearney Canal near campus. During your first sampling trip, you notice that the total length (i.e., measured from the tip of the snout to the very tip of the tail) of the fish you measure appear to be smaller than the average total length of the species as recorded among all known individuals across their range. The mean total length noted in one publication is 85.00 mm with a standard deviation of 4.50. Below are your data from 20 minnows that you captured during your first sampling trip to the Kearney Canal:

Fish data for this problem.
Fish ID Length (mm)
1 89.58
2 75.44
3 86.86
4 74.71
5 69.70
6 100.34
7 73.70
8 69.56
9 96.24
10 79.35
11 61.37
12 62.82
13 95.45
14 98.71
15 100.34
16 57.57
17 70.54
18 78.65
19 65.39
20 65.57

NOTE: you will have to create the numeric object for this problem. use c to link things together; e.g.:

x <- c(1,5,8,9)
x
[1] 1 5 8 9
  1. State the null and alternative hypotheses for this study.
  2. Calculate the first quartile, median, third quartile, and interquartile range of your response variable. Create a boxplot. Based on your results, are there any outliers in your data? Explain.
  3. Calculate the \(z\)-score for this scenario.
  4. What is the probability that, by random chance alone, you would find your observed mean or something more extreme?
  5. Assume that you set your \(\alpha\) for your study prior to your data collection to 0.05. Based on this information and the \(p\) value you obtained, is your null hypothesis supported or rejected? Report your conclusion in a full sentence, including the \(Z\) score and the \(p\) value in your answer.

8.2 Time spent on canvas

You are curious about how much time your classmates spend on Canvas for BIOL305. Let’s say you get the following data for the amount of time folks spend on Canvas:

time.hrs <- c(19.65, 69.29, 6.83, 5.50, 17.98,
              19.89, 8.52, 71.37, 12.62, 4.62,
              3.00, 5.69, 10.79, 6.59, 32.56, 
              15.72, 3.67, 10.04, 5.45, 3.69, 
              20.17, 12.99, 1.56, 2.40, 55.20)

student <- 1:length(time.hrs)

time_on_canvas <- cbind(student, time.hrs) |> 
  as.data.frame() |> 
  mutate(time.hrs = as.numeric(time.hrs)) |> 
  mutate(student = as.numeric(student))

head(time_on_canvas)
  student time.hrs
1       1    19.65
2       2    69.29
3       3     6.83
4       4     5.50
5       5    17.98
6       6    19.89
  1. Which variable is the response variable? What type of data are these?
  2. Is the response variable normally distributed? Support your answer with a histogram, a cumulative frequency plot, assessments of skewness and kurtosis, and an indication of if outliers exist. Change the title and axes labels of the plots to make them intelligible.
  3. If a transformation is needed, which transformation is required? Note - you only have to do a histogram and a shapiro.test to assess a transformation. As soon as you find a transformation that works, you do not have to do another.
  4. What is the 95% confidence interval for the mean of these data? Report the upper and lower confidence limits as well as the mean in a full sentence. Don’t forget to mention the units of your answer. HINT: you may have to back-transform your data.