Instructions

In your markdown answer the following problems. Include the following:

  1. Write the hypothesis tests.
  2. p-value
  3. State your conclusion.

Question 1

ACTN3 is a gene that encodes alpha-actinin-3, a protein in fast-twitch muscle fibers, important for activities like sprinting and weightlifting. The gene has two main alleles: R (functional) and X (non-functional). The R allele is linked to better performance in strength, speed, and power sports, while the X allele is associated with endurance due to a greater reliance on slow-twitch fibers. However, athletic performance is influenced by various factors, including training, environment, and other genes, making the ACTN3 genotype just one contributing factor. A study examines the ACTN3 genetic alleles R and X, also associated with fast-twitch muscles. Of the 436 people in this sample, 244 were classified as R, and 192 were classified as X. Does the sample provide evidence that the two options are not equally likely? Conduct the test using a chi-square goodness-of-fit test.

  1. Hypothesis

Null Hypothesis (\(H_0\)): \(p_R = 0.5, p_x = 0.5\) (The R and X alleles are likely in the population)

Alternative Hypothesis (\(H_a\)): \(p_R ≠ 0.5, p_x ≠ 0.5\) (The R and X alleles are not equal in the population)

  1. P-Value
observed <- c(R = 244, X = 192)
expected_probs <- c(0.5, 0.5)
test_result <- chisq.test(observed, p = expected_probs)
test_result$p.value
## [1] 0.01276179
  1. Conclusion

With p-value of 0.01276, which is less than 0.05, we can safely reject the null hypothesis. Thus, it can be concluded that R and X alleles are not likely to be equal in this sample pool.

Question 2

Who Is More Likely to Take Vitamins: Males or Females? The dataset NutritionStudy contains, among other things, information about vitamin use and the gender of the participants. Is there a significant association between these two variables? Use the variables VitaminUse and Gender to conduct a chi-square analysis and give the results. (Test for Association)

  1. Hypothesis

Null Hypothesis (\(H_0\)): There’s no association between Gender and VitaminUse

Alternative Hypothesis (\(H_a\)): There is a significant association between association between Gender and VitaminUse

  1. P-Value
nutrition_data <- read.csv("NutritionStudy.csv")
vitamin_gender_table <- table(nutrition_data$Sex, nutrition_data$VitaminUse)
print(vitamin_gender_table)
##         
##           No Occasional Regular
##   Female  87         77     109
##   Male    24          5      13
chi_test_results <- chisq.test(vitamin_gender_table)
print(chi_test_results)
## 
##  Pearson's Chi-squared test
## 
## data:  vitamin_gender_table
## X-squared = 11.071, df = 2, p-value = 0.003944
p_val <- chi_test_results$p.value
  1. Conclusion

With p-value of 0.003944, which is less than 0.05, we can reject the null hypothesis. Thus, it can be concluded that VitaminUse has a significant association with gender.

Question 3

Most fish use gills for respiration in water, and researchers can observe how fast a fish’s gill cover beats to study ventilation, much like we might observe a person’s breathing rate. Professor Brad Baldwin is interested in how water chemistry might affect gill beat rates. In one experiment, he randomly assigned fish to tanks with different calcium levels. One tank was low in calcium (0.71 mg/L), the second tank had a medium amount (5.24 mg/L), and the third tank had water with a high calcium level (18.24 mg/L). His research team counted gill rates (beats per minute) for samples of 30 fish in each tank. The results are stored in FishGills3. Perform ANOVA test to see if the mean gill rate differs depending on the calcium level of the water.

  1. Hypothesis

Null Hypothesis (\(H_0\)): The mean gill rates are the same for all three of the calcium levels

Alternative Hypothesis (\(H_a\)): At least one of the mean gill rates is difference from the others

  1. P-Value
fish_data <- read.csv("FishGills3.csv")
anova_model <- aov(GillRate ~ Calcium, data = fish_data)
summary(anova_model)
##             Df Sum Sq Mean Sq F value Pr(>F)  
## Calcium      2   2037  1018.6   4.648 0.0121 *
## Residuals   87  19064   219.1                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  1. Conclusion

With p-value of 0.0121, which is less than 0.05, we can safely reject the null hypothesis. Thus, it can be concluded that the mean gill rates of the fish is different depending on the calcium levels of the water.