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:
\(p_1\): proportion of people with ACTN3 genetic allele R
\(p_2\): proportion of people with ACTN3 genetic allele X
Null hypothesis (\(H_0\)): \(p_1 = \frac{1}{2}\), \(p_2 = \frac{1}{2}\)
Alternative hypothesis (\(H_a\)): at least 1 \(p_i \neq \frac{1}{2}\)
#Conduct Chi-Square goodness-of-fit test. Probabilities are 1/2 and 1/2.
count_r <- 244
count_x <- 192
chisq.test(c(count_r, count_x))
##
## Chi-squared test for given probabilities
##
## data: c(count_r, count_x)
## X-squared = 6.2018, df = 1, p-value = 0.01276
p-value = 0.01276
Based on the p-value obtained, we can reject the null hypothesis that a person is equally likely to have either allele and conclude that there are different probabilities for having either allele.
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)
Null hypothesis (\(H_0\)): There is no association between vitamin use and gender
Alternative hypothesis (\(H_a\)): There is an association between vitamin use and gender
#Conduct Chi-Square Test for Association test.
df <- read.csv("NutritionStudy.csv")
observed_df <- table(df$VitaminUse, df$Sex)
chisq.test(observed_df)
##
## Pearson's Chi-squared test
##
## data: observed_df
## X-squared = 11.071, df = 2, p-value = 0.003944
p-value = 0.003944
Based on this p-value, we can reject the null hypothesis and conclude that there is an association between vitamin use and gender.
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.
Hypothesis:
\(\mu_1\): average gill rate for fish in low calcium (0.71 mg/L) environments
\(\mu_2\): average gill rate for fish in medium calcium (5.24 mg/L) environments
\(\mu_3\): average gill rate for fish in high calcium (18.24 mg/L) environments
Null hypothesis (\(H_0\)): \(\mu_1 = \mu_2 = \mu_3\)
Alternative hypothesis (\(H_a\)): at least 1 \(\mu_i\) is different from the others
fish_df <- read.csv("FishGills3.csv")
model <- aov(GillRate ~ Calcium, data = fish_df)
summary(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: 0.0121
The p-value of 0.012 is fairly small, giving us evidence to reject the null hypothesis. There is a significant amount of difference in breathing rates between the tanks.