13  Final exam & review

Author

University of Nebraska at Kearney Biology

13.1 Introduction

These are questions that are posed as they would be on a final. Please complete each part of each question; we will review the answers. The following data are either imaginary or pulled from publicly available sources like Wikipedia.

library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.5
✔ forcats   1.0.0     ✔ stringr   1.5.1
✔ ggplot2   3.5.2     ✔ tibble    3.2.1
✔ lubridate 1.9.4     ✔ tidyr     1.3.1
✔ purrr     1.0.4     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors

13.2 Happiness

You decide to ask your friends to rate their happiness on a scale of 0-100 before and after you bother them to ask how happy they are, thereby inciting an existential crises within each of them. You predict that asking this question will decrease the happiness they are feeling at that moment. These data are ranked data, but assume they are parametric given the size of the scale being used.

before_asking <- c(96,80,86,92,100,92,95,91,87)
after_asking <- c(72,53,90,85,90,86,83,79,62)

happiness <- cbind(before_asking, after_asking) |> 
  as.data.frame()

happiness
  before_asking after_asking
1            96           72
2            80           53
3            86           90
4            92           85
5           100           90
6            92           86
7            95           83
8            91           79
9            87           62

13.2.1 What are the null and statistical hypotheses of this study?

13.2.2 What statistical test should be used for this test? Justify your answer, and be specific.

13.2.3 Calculate the appropriate test statistic, showing all or your work.

13.2.4 Assume that \(\alpha = 0.05\). State your final conclusion from the survey.

13.3 Running and grades

You hear that going running is good for your grades. You decide to look and see if the amount of time people spend running is related to their grades. You obtain the following data:

run_time <- c(20,25,22,50,30,10,6)
grade <- c(94,84,95,72,88,90,85)

run_grades <- cbind(run_time, grade) |> 
  as.data.frame()

run_grades
  run_time grade
1       20    94
2       25    84
3       22    95
4       50    72
5       30    88
6       10    90
7        6    85

13.3.1 What is the appropriate analysis for this question?

13.3.2 Perform the test. What is the test statistic?

13.3.3 State your conclusion about this scenario, using \(\alpha = 0.05\).

13.4 Fosbury Flop

High-jumpers use the “Fosbury Flop” because it improves their performance by allowing their center of mass to pass under the high-jump bar while their bodies pass over the bar. Below are jump heights (in meters) for world records from before the Fosbury Flop was widely used and after the Fosbury Flop was widely used. Does the flop significantly improve athlete performace?

pre_flop <- c(2.09,2.12,2.15,2.18,2.17,2.28,2.29)
post_flop <- c(2.30,2.33,2.39,2.34,2.42,2.45,2.44)

jump_heights <- cbind(pre_flop, post_flop) |> 
  as.data.frame()

jump_heights
  pre_flop post_flop
1     2.09      2.30
2     2.12      2.33
3     2.15      2.39
4     2.18      2.34
5     2.17      2.42
6     2.28      2.45
7     2.29      2.44

13.4.1 What is the appropriate test for this analysis? Justify your answer, and be specific.

13.4.2 Perform the test. What is the test statistic?

13.4.3 State your conclusion about this scenario. Set \(\alpha = 0.05\).

13.5 Sandhills, Stonehills

You decide to look at concentrations of Greater Prairie-Chickens Tympanuchus cupido in fields a set amount of years after control burns. The following table shows the count of prairie-chickens in each field from the year of the burn until 5 years after the burn. Conditions are lettered to ensure sorting is performed correctly.

Location <- c(rep("Sandhills", 4), rep("Stonehills", 4))
a_burn_year <- c(1,0,3,2,1,0,0,2)
b_one_year_post_burn <- c(3,5,7,6,5,3,2,5)
c_five_years_post_burn <- c(20,21,15,8,8,7,10,8)

prairie_chickens <- cbind(Location, a_burn_year, b_one_year_post_burn, c_five_years_post_burn) |> 
  as.data.frame()

prairie_chickens
    Location a_burn_year b_one_year_post_burn c_five_years_post_burn
1  Sandhills           1                    3                     20
2  Sandhills           0                    5                     21
3  Sandhills           3                    7                     15
4  Sandhills           2                    6                      8
5 Stonehills           1                    5                      8
6 Stonehills           0                    3                      7
7 Stonehills           0                    2                     10
8 Stonehills           2                    5                      8

13.5.1 What is the appropriate test?

13.5.2 What is / are the explanatory variables?

13.5.3 Perform the appropriate test. Make a graph if necessary.

13.5.4 State your conclusions about this test. Set \(\alpha = 0.05\).