OneOneWayWayANOVAANOVA
Analysis of Variance will be used here to test the null hypothesis that the means of three or more populations are the same against the alternative fact not all population means are the same. (For two populations t-tests are more efficient.)
One-way ANOVA is used under the following assumptions:
A farmer uses three different types of fertilizer.
Let {$\mu_1, \,\mu_2, \,$ and $\mu_3 $} be the yields in $ (kg/m^3)$of wheat when three different fertilizers are used. The null and alternative hyposes will be$$\begin{aligned} H_0:& \quad \mu_1=\mu_2=\mu_3 \\ H_1:&\quad \mu_1 \neq\mu_2 \neq \mu_3 \end{aligned} $$
We can test $ H_0: \mu_1=\mu_2,\,\, H_0: \mu_2=\mu_3,\,\, $and $H_0: \mu_1=\mu_3, $ separately, but their Type I error values add up.
TheTheANOVAANOVAtesttest
The test proceeds by calculating two estimates of the common variance $\sigma^2 $.
Let $\overline{X}$ be the mean of all observations, let $\overline X_i$ be the mean in the sample of population $i$, and let $X_{ij}$ be the $i^{th}$ measurement in the $j^{th}$ sample. Then the between samples sum of squares is $$ MSB=\frac{1}{k-1} \sum_{i=1}^{k}(\overline{X}_i-\overline{X})^2 $$and the within samples sum of squares is$$ MSW=\frac{1}{n-k} \sum_{i=1}^{k} \sum_{j=1}^{n_i} (\overline{X}_{ij}-\overline{X}_i)^2 $$Here $k$ is the number of different populations (or treatments), $n_i$ is the size of the sample from population $i$ and$$ n =n_1+n_2+\cdots +n_k $$The test statistic is$$ f =\frac{MSB}{MSW} $$with$ (k-1, n-1) $degrees of freedom.
$MSB $ overestimates $\sigma^2$ if $H_0$ is false. So this is a one tailed test with a critical region in the right tail of the F-distribution.
Three types of fertilizer produce the following yields in $kg/m^3$ of wheat:$$ \begin{array}{l|ccccc} \text{Fertilizer 1} & 48 & 73 & 51 & 65 & 87\\ \text{Fertilizer 2} & 55 & 85 & 70 & 69 & 90\\ \text{Fertilizer 3} & 84 & 68 & 95 & 74 & 67 \end{array} $$Long calculations show that$$\begin{aligned} MBS&=216.07 \\ &\\ MSW &=197.73 \\ & \\ f &= \frac{216.07}{197.73}=1.09 \text{ with }\; (2, 12) \; d.f. \end{aligned} $$$p-value=0.3773 >> 0.05 =\alpha \quad \Rightarrow \quad $Fail to reject $ H_0 $
This sample does not provide enough evidence to claim that the 3 types of fertilizer give different yields of wheat.