Background

This experiment comes from the R help file ?chickwts and the data is correspondingly recorded in the chickwts data set.

“An experiment was conducted to measure and compare the effectiveness of various feed supplements on the growth rate of chickens. Newly hatched chicks were randomly allocated into six groups, and each group was given a different feed supplement. Their weights in grams after six weeks are given along with feed types.”

library(car)
library(mosaic)
library(pander)
library(tidyverse)

The six feed types were casein, horsebean, linseed, meatmeal, soybean, and sunflower.

Analysis

Applying a one-way ANOVA to this study, we have the null hypothesis that the average weight of grown chickens, represented by \(\mu\), is equal for each feed type. This is formally written as follows.

\[ H_0: \mu_\text{casein} = \mu_\text{horsebean} = \mu_\text{linseed} = \mu_\text{meatmeal} = \mu_\text{soybean} = \mu_\text{sunflower} = \mu \]

The alternative hypotheses claims that at least one of the feed types produces a significantly different average weight in the grown chickens.

\[ H_a: \text{at least one mean differs} \]

These hypotheses will allow us the ability to answer the question, is the average chick weight the same for each feed type? Or is at least one feed type different on average than the others?

We will use a signifance level of \(\alpha = 0.05\) for this study.

To perform the analysis we compute the following ANOVA.

chick.aov <- aov(weight ~ feed, data=chickwts)
summary(chick.aov) %>% pander()
Analysis of Variance Model
  Df Sum Sq Mean Sq F value Pr(>F)
feed 5 231129 46226 15.36 5.936e-10
Residuals 65 195556 3009 NA NA

The \(p\)-value of the test is highly significant \((p = 5.9\times10^{-10})\), therefore we conclude the alternative, that at least one feed type results in a different average weight of the grown chickens.

The following plots demonstrate that the assumptions of the ANOVA were satisfied. This can be seen as the residuals versus fitted values plot shows roughly constant variance within each vertical group of dots, and the Q-Q Plot shows normality of the residuals as all dots stay within the boundary lines.

par(mfrow=c(1,2))
plot(chick.aov, which=1, pch=16)
qqPlot(chick.aov$residuals, id=FALSE)

The following graphic provides an explanation of which feed types are producing the highest average weights. (Note, this plot was created using mPlot(chickwts) and then editing the code slightly.)

xyplot(weight ~ feed, data=chickwts, main="Experiment on how Feed Type impacts Chicken Growth", ylab="Adult Weight of Chickens (in grams)", xlab="Type of Feed Chickens were Fed \n (Blue line shows average weights per feed type.)", type=c("p","a"))

The averages depicted by the blue line in the plot above are summarized in the table below as well as the standard deviation and sample size for the final chicken weights within each feed type.

pander(favstats(weight ~ feed, data=chickwts)[,c("feed","mean","sd","n")])
feed mean sd n
casein 323.6 64.43 12
horsebean 160.2 38.63 10
linseed 218.8 52.24 12
meatmeal 276.9 64.9 11
soybean 246.4 54.13 14
sunflower 328.9 48.84 12

Interpretation

It appears that horsebean and linseed should not be used as feed types, as they have the lowest average weights at \(160.2\) and \(218.8\), respectively. The best two feed types appear to be casein and sunflower at \(323.6\) and \(328.9\), respectively. At this point, a cost analysis would also be important in deciding which feed type would provide the greatest average weight at the lowest cost. If significantly cheaper, meatmeal may be worth considering at an average weight of 276.9.