Use an ANOVA to determine if there is a difference in mean weights between diets. Assume that all of the assumptions are met to perform the procedure. α = 0.01.use data set "chickweight" and use R
Null and Alternate hypothesis are
Ho : There is no difference in mean weights between diets
Ha : There is a difference in mean weights between diets
R-code
data(ChickWeight)
anova(lm(weight ~ Diet, ChickWeight))
Output
ANOVA table
Analysis of Variance Table Response: weight Df Sum Sq Mean Sq F value Pr(>F) Diet 3 155863 51954 10.81 6.433e-07 *** Residuals 574 2758693 4806
Conclusion :
From the ANOVA table output, we can see that the p-value (Pr (>F) = 6.433e-07) is very low
p-value < 0.05, hence we reject the null hypothesis
Thus, at 5% level of significance, we can say that there is enough statistical evidence to conclude that
there is a difference in mean weights between diets
Get Answers For Free
Most questions answered within 1 hours.