Problem 1: ACTN3 Alleles

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 the sample provide evidence that the two options are not equally likely? Conduct the test using a 192 were classified as X. Does chi-square goodness-of-fit test.

Hypotheses

  • H₀: The R and X alleles are equally likely (p_R = p_X = 0.5).
  • H₁: The R and X alleles are not equally likely.

R code chunk

# Observed counts from the problem
allele_counts <- c(R = 244, X = 192)

# Test equal probabilities (0.5, 0.5)
chisq_test1 <- chisq.test(allele_counts, p = c(0.5, 0.5))
chisq_test1
## 
##  Chi-squared test for given probabilities
## 
## data:  allele_counts
## X-squared = 6.2018, df = 1, p-value = 0.01276
chisq_test1$p.value
## [1] 0.01276179

P-value and conclusion

p-value ≈ 0.0128

Because p ≈ 0.0128 < 0.05, we reject H₀. There is significant evidence that the R and X alleles are not equally likely in the population.

Problem 2: NutritionStudy

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)

Hypotheses

  • H₀: Vitamin use and sex are independent (no association).
  • H₁: Vitamin use and sex are associated.

R code chunk

#Read the dataset
nutrition <- read.csv("NutritionStudy.csv")

vit_sex_table <- table(nutrition$VitaminUse, nutrition$Sex)
vit_sex_table
##             
##              Female Male
##   No             87   24
##   Occasional     77    5
##   Regular       109   13
#Chi-square test
chisq_test2 <- chisq.test(vit_sex_table)
chisq_test2
## 
##  Pearson's Chi-squared test
## 
## data:  vit_sex_table
## X-squared = 11.071, df = 2, p-value = 0.003944
chisq_test2$p.value
## [1] 0.003944277

P-value and conclusion

p-value ≈ 0.00394

Because p ≈ 0.0039 < 0.05, we reject H₀. There is significant evidence of an association between vitamin use and sex in this sample.

Problem 3: FishGills3

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.

Hypotheses

  • H₀: Mean gill rate is the same for all calcium levels
  • H₁: At least one mean gill rate is different.

R code chunk

#Read the dataset
fish <- read.csv("FishGills3.csv")

str(fish)
## 'data.frame':    90 obs. of  2 variables:
##  $ Calcium : chr  "Low" "Low" "Low" "Low" ...
##  $ GillRate: int  55 63 78 85 65 98 68 84 44 87 ...
table(fish$Calcium)
## 
##   High    Low Medium 
##     30     30     30
#One-way ANOVA
anova_model <- aov(GillRate ~ Calcium, data = fish)
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

P-value and conclusion

F-statistic ≈ 4.65 df = (2, 87) p-value ≈ 0.0121

Because p ≈ 0.0121 < 0.05, we reject H₀. There is statistically significant evidence that mean gill rate differs by calcium level; at least one calcium level produces a different average gill rate.