Problem 1: ACTN3 Alleles

Null hypothesis (H0): The R and X alleles are equally likely (50% each).

Alternative hypothesis (Ha): The R and X alleles are not equally likely.

observed <- c(R = 244, X = 192)
chisq.test(observed, p = c(0.5, 0.5))
## 
##  Chi-squared test for given probabilities
## 
## data:  observed
## X-squared = 6.2018, df = 1, p-value = 0.01276

P-value: Approximately 0.0128.

Conclusion: Since the p-value is less than 0.05, I reject the null hypothesis. There is enough evidence to suggest that the R and X alleles are not equally likely in the population.

Problem 2: Vitamin Use and Gender

Null hypothesis (H0): Gender and vitamin use are not associated.

Alternative hypothesis (Ha): Gender and vitamin use are associated.

The dataset uses the column name Sex for gender, so I use Sex and VitaminUse for this test.

nutrition <- read.csv("NutritionStudy.csv")
vitamin_table <- table(nutrition$Sex, nutrition$VitaminUse)
vitamin_table
##         
##           No Occasional Regular
##   Female  87         77     109
##   Male    24          5      13
chisq.test(vitamin_table, correct = FALSE)
## 
##  Pearson's Chi-squared test
## 
## data:  vitamin_table
## X-squared = 11.071, df = 2, p-value = 0.003944

P-value: Approximately 0.0039.

Conclusion: Since the p-value is less than 0.05, I reject the null hypothesis. There is a significant association between gender and vitamin use. In this sample, females reported regular or occasional vitamin use more often than males, proportionally. This does not mean gender causes vitamin use.

Problem 3: Calcium Level and Fish Gill Rate

Null hypothesis (H0): The mean gill rates are the same for low, medium, and high calcium levels.

Alternative hypothesis (Ha): At least one calcium level has a different mean gill rate.

fish <- read.csv("FishGills3.csv")
fish$Calcium <- factor(fish$Calcium, levels = c("Low", "Medium", "High"))
aggregate(GillRate ~ Calcium, data = fish, FUN = mean)
##   Calcium GillRate
## 1     Low 68.50000
## 2  Medium 58.66667
## 3    High 58.16667
fish_model <- aov(GillRate ~ Calcium, data = fish)
summary(fish_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: Approximately 0.0121.

Conclusion: Since the p-value is less than 0.05, I reject the null hypothesis. There is enough evidence that the mean gill rate is different for at least one calcium level. The low-calcium group had the highest sample mean, but the ANOVA test alone does not tell us exactly which groups differ.

Overall Summary

I used a significance level of 0.05 for all three problems. All three p-values were below 0.05, so I rejected each null hypothesis.