July 8, 2025
Tuesday
Researchers in Equestria are interested in whether the habitat environment influences the growth of baby seaponies. Specifically, they want to compare the growth rates of baby seaponies living in Coral Reef habitats to those living in Kelp Forest habitats.
The seaponies in each habitat grow under natural conditions, and each baby seapony belongs to only one habitat: either the Coral Reef or the Kelp Forest. After a full season, researchers record the growth rate (in centimeters per month) for each seapony.
The goal is to determine whether the average growth rates differ between the two habitats.
Use the apporpriate hypothesis test to answer the researchers’ question. Test at the \alpha=0.05 level.
Is this independent or dependent data?
Brown-Forsythe-Levene test for equality of variances:
Null: σ²_Coral Reef = σ²_Kelp Forest
Alternative: At least one variance is different
Test statistic: F(1,98) = 0.008
p-value: p = 0.928
Conclusion: Fail to reject the null hypothesis (p = 0.9276 ≥ α = 0.05)
Researchers in Equestria are interested in whether the habitat environment influences the growth of baby seaponies. Specifically, they want to compare the growth rates of baby seaponies living in Coral Reef habitats to those living in Kelp Forest habitats.
The seaponies in each habitat grow under natural conditions, and each baby seapony belongs to only one habitat: either the Coral Reef or the Kelp Forest.
After a full season, researchers record the growth rate (in centimeters per month) for each seapony. The goal is to determine whether the average growth rates differ between the two habitats. Test at the \alpha=0.05 level.
What hypotheses are we testing?
seapony_growth %>% independent_mean_HT(continuous = growth,
grouping = habitat,
mu = 0,
alternative = "two.sided",
alpha = 0.05)
Two-sample t-test for two independent means and equal variance:
Null: H₀: μ₁ − μ₂ = 0
Alternative: H₁: μ₁ − μ₂ ≠ 0
Test statistic: t(98) = -7.415
p-value: p < 0.001
Conclusion: Reject the null hypothesis (p = < 0.001 < α = 0.05)
Rarity has created a new type of wing armor designed to protect dragons during flight without reducing their wing strength.
To test the effectiveness of her design, Spike measures the wing strength of each dragon before putting on the armor. The dragons are then fitted with Rarity’s wing armor, and their wing strength is measured again while wearing the armor.
The goal is to determine whether the wing armor has a significant effect on dragon wing strength.
Use the apporpriate hypothesis test to answer the researchers’ question. Test at the \alpha=0.01 level.
Is this independent or dependent data?
Rarity has created a new type of wing armor designed to protect dragons during flight without reducing their wing strength.
To test the effectiveness of her design, Spike measures the wing strength of each dragon before putting on the armor. The dragons are then fitted with Rarity’s wing armor, and their wing strength is measured again while wearing the armor.
The goal is to determine whether the wing armor has a significant effect on dragon wing strength.
Use the apporpriate hypothesis test to answer the researchers’ question. Test at the \alpha=0.01 level.
What hypotheses are we testing?
dragon_wings %>% dependent_median_HT(col1 = after,
col2 = before,
alternative = "greater",
m = 0,
alpha = 0.01)
Wilcoxon Signed-Rank Test for the median of differences:
Null: H₀: M_d = 0
Alternative: H₁: M_d > 0
Test statistic: T = 7260
p-value: p < 0.001
Conclusion: Reject the null hypothesis (p = < 0.001 < α = 0.01)
Seaponies are studying how quickly they can escape from predators in different environments. They compare escape times in two distinct locations: Shark Areas, where predators are common and seaponies must be on high alert, and Calm Coves, where predators are rare, and seaponies may be more relaxed.
The seaponies in each area are different individuals: no seapony is measured in both locations.
The goal is to determine whether the typical escape time differs between seaponies in Shark Areas and those in Calm Coves.
Use the apporpriate hypothesis test to answer the researchers’ question. Test at the \alpha=0.01 level.
Is this independent or dependent data?
Seaponies are studying how quickly they can escape from predators in different environments. They compare escape times in two distinct locations: Shark Areas, where predators are common and seaponies must be on high alert, and Calm Coves, where predators are rare, and seaponies may be more relaxed.
The seaponies in each area are different individuals: no seapony is measured in both locations.
The goal is to determine whether the typical escape time differs between seaponies in Shark Areas and those in Calm Coves.
Use the apporpriate hypothesis test to answer the researchers’ question. Test at the \alpha=0.01 level.
What hypotheses are we testing?
escape_times %>% independent_median_HT(continuous = time,
grouping = area,
alternative = "two",
m = 0,
alpha = 0.01)
Wilcoxon Rank Sum Test:
Null: H₀: M₁ - M₂ = 0
Alternative: H₀: M₁ - M₂ = 0
Test statistic: T = 10152
p-value: p < 0.001
Conclusion: Reject the null hypothesis (p = < 0.001 < α = 0.01)
Fluttershy has developed a magical serum that she believes will help butterflies grow longer, stronger wings.
To test her serum, she carefully measures the wing lengths of each butterfly before applying the treatment. After giving the serum time to work, she measures the same butterflies again to see if their wings have grown.
Fluttershy’s goal is to determine whether the magical serum causes a significant change in butterfly wing length.
Use the apporpriate hypothesis test to answer Fluttershy’s question. Test at the \alpha=0.05 level.
Is this independent or dependent data?
Fluttershy has developed a magical serum that she believes will help butterflies grow longer, stronger wings.
To test her serum, she carefully measures the wing lengths of each butterfly before applying the treatment. After giving the serum time to work, she measures the same butterflies again to see if their wings have grown.
Fluttershy’s goal is to determine whether the magical serum causes a significant change in butterfly wing length.
Use the apporpriate hypothesis test to answer Fluttershy’s question. Test at the \alpha=0.05 level.
What hypotheses are we testing?
butterfly_wings %>% dependent_mean_HT(col1 = after,
col2 = before,
alternative = "greater",
m = 0,
alpha = 0.05)
Paired t-test for the mean of differences:
Null: H₀: μ_d = 0
Alternative: H₁: μ_d > 0
Test statistic: t(149) = 15.757
p-value: p < 0.001
Conclusion: Reject the null hypothesis (p = < 0.001 < α = 0.05)
STA4173 - Biostatistics - Summer 2025