Problem 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

Hypothesis:

observed <- c(244, 192)
theoretical <- c(1/2, 1/2)

\(H_0\):\(p_1\) = \(p_2\) = 1/2
\(H_a\): at least one \(p_i\) \(\neq\) 1/2

P-Value:

expected <- theoretical * sum(observed)
expected
## [1] 218 218

All are greater than 5.

chisq.test(observed, p = theoretical)
## 
##  Chi-squared test for given probabilities
## 
## data:  observed
## X-squared = 6.2018, df = 1, p-value = 0.01276

p-value = 0.01276

Conclusion: With a p-value of 0.01276, which is less than the typical significance level of 0.05, there is sufficient evidence to reject the null hypothesis.

Therefore, we can conclude that R and X alleles are not equally likely.

Problem 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)

nutrition_study <- read.csv("NutritionStudy.csv")
head(nutrition_study)
##   ID Age Smoke Quetelet Vitamin Calories  Fat Fiber Alcohol Cholesterol
## 1  1  64    No  21.4838       1   1298.8 57.0   6.3     0.0       170.3
## 2  2  76    No  23.8763       1   1032.5 50.1  15.8     0.0        75.8
## 3  3  38    No  20.0108       2   2372.3 83.6  19.1    14.1       257.9
## 4  4  40    No  25.1406       3   2449.5 97.5  26.5     0.5       332.6
## 5  5  72    No  20.9850       1   1952.1 82.6  16.2     0.0       170.8
## 6  6  40    No  27.5214       3   1366.9 56.0   9.6     1.3       154.6
##   BetaDiet RetinolDiet BetaPlasma RetinolPlasma    Sex VitaminUse PriorSmoke
## 1     1945         890        200           915 Female    Regular          2
## 2     2653         451        124           727 Female    Regular          1
## 3     6321         660        328           721 Female Occasional          2
## 4     1061         864        153           615 Female         No          2
## 5     2863        1209         92           799 Female    Regular          1
## 6     1729        1439        148           654 Female         No          2

Hypothesis:
\(H_0\) : Vitamin usage is not associated with gender.
\(H_a\) : Vitamin usage is associated with gender.

P-Value:

observed_dataset <- table(nutrition_study$Sex, nutrition_study$VitaminUse)
observed_dataset
##         
##           No Occasional Regular
##   Female  87         77     109
##   Male    24          5      13
chisq.test(observed_dataset)
## 
##  Pearson's Chi-squared test
## 
## data:  observed_dataset
## X-squared = 11.071, df = 2, p-value = 0.003944

p-value: 0.003944

Conclusion: With the p-value being 0.003944 which is less than the the typical significance level of 0.05, there is sufficient evidence to reject the null hypothesis.

Therefore, it can be concluded that there is evidence of a significant association between gender and vitamin usage.


Problem 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.

fish_gills <- read.csv("FishGills3.csv")
head(fish_gills)
##   Calcium GillRate
## 1     Low       55
## 2     Low       63
## 3     Low       78
## 4     Low       85
## 5     Low       65
## 6     Low       98

Hypothesis:
\(H_0\): \(\mu_A\) = \(\mu_B\) = \(\mu_C\)
\(H_a\): not all \(\mu_i\) are equal

P-Value:

anova_result <- aov(GillRate ~ Calcium, data = fish_gills)

summary(anova_result)
##             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
TukeyHSD(anova_result)
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = GillRate ~ Calcium, data = fish_gills)
## 
## $Calcium
##                  diff        lwr        upr     p adj
## Low-High    10.333333   1.219540 19.4471264 0.0222533
## Medium-High  0.500000  -8.613793  9.6137931 0.9906108
## Medium-Low  -9.833333 -18.947126 -0.7195402 0.0313247

P-value: 0.0121

Conclusion: With the p-value of 0.0121 being less than the typical significance level of 0.05, there is sufficient evidence to reject the null hypothesis.

Therefore, the test suggests that the mean gill rate does differ depending on the calcium level of the water.

The most significant difference is between low-high and medium-low because the p-adj is less than 0.05.