Problem setup (one-way ANOVA)
An anova calculator for a one-way ANOVA compares the means of \(k\) independent groups by splitting total variability into between-group and within-group components. Consider three groups (each \(n=5\)):
| Group | Observations | \(n_j\) | \(\bar{x}_j\) |
|---|---|---|---|
| A | 8, 9, 6, 7, 10 | 5 | 8.0 |
| B | 5, 4, 6, 5, 3 | 5 | 4.6 |
| C | 9, 10, 12, 11, 9 | 5 | 10.2 |
Hypotheses (one-way ANOVA):
\(H_0:\ \mu_A=\mu_B=\mu_C\)
(all population means equal)
\(H_1:\) at least one population mean differs
Standard conditions: independent observations, approximately normal errors within each group, and roughly equal population variances.
Step 1: Compute the overall mean
Total sample size \(N = 5 + 5 + 5 = 15\). The overall mean is \[ \bar{x}=\frac{\sum_{j=1}^{k}\sum_{i=1}^{n_j} x_{ij}}{N}. \]
Group sums: \(A:40\), \(B:23\), \(C:51\). Hence \(\sum x_{ij}=40+23+51=114\), so \[ \bar{x}=\frac{114}{15}=7.6. \]
Step 2: Between-group sum of squares \(SSB\)
\[ SSB=\sum_{j=1}^{k} n_j \cdot (\bar{x}_j-\bar{x})^2. \]
| Group | \(\bar{x}_j-\bar{x}\) | \((\bar{x}_j-\bar{x})^2\) | \(n_j \cdot (\bar{x}_j-\bar{x})^2\) |
|---|---|---|---|
| A | \(8.0-7.6=0.4\) | 0.16 | \(5 \cdot 0.16=0.8\) |
| B | \(4.6-7.6=-3.0\) | 9.00 | \(5 \cdot 9.00=45.0\) |
| C | \(10.2-7.6=2.6\) | 6.76 | \(5 \cdot 6.76=33.8\) |
Therefore, \[ SSB = 0.8 + 45.0 + 33.8 = 79.6. \]
Step 3: Within-group sum of squares \(SSW\)
\[ SSW=\sum_{j=1}^{k}\sum_{i=1}^{n_j} (x_{ij}-\bar{x}_j)^2. \]
This measures variation inside each group around its own sample mean.
| Group | \(\sum (x_{ij}-\bar{x}_j)^2\) | Computation (squared deviations) |
|---|---|---|
| A (\(\bar{x}_A=8.0\)) | 10.0 | \((0)^2+(1)^2+(-2)^2+(-1)^2+(2)^2=0+1+4+1+4\) |
| B (\(\bar{x}_B=4.6\)) | 5.2 | \((0.4)^2+(-0.6)^2+(1.4)^2+(0.4)^2+(-1.6)^2=0.16+0.36+1.96+0.16+2.56\) |
| C (\(\bar{x}_C=10.2\)) | 6.8 | \((-1.2)^2+(-0.2)^2+(1.8)^2+(0.8)^2+(-1.2)^2=1.44+0.04+3.24+0.64+1.44\) |
Hence, \[ SSW = 10.0 + 5.2 + 6.8 = 22.0. \]
Step 4: Degrees of freedom, mean squares, and the F statistic
With \(k=3\) groups and \(N=15\): \[ df_B = k-1 = 2,\qquad df_W = N-k = 12. \]
Mean squares: \[ MSB=\frac{SSB}{df_B}=\frac{79.6}{2}=39.8,\qquad MSW=\frac{SSW}{df_W}=\frac{22.0}{12}=1.8333\ldots \]
Test statistic: \[ F=\frac{MSB}{MSW}=\frac{39.8}{1.8333\ldots}=21.7091\ldots\approx 21.71. \]
Step 5: Decision using p-value (and critical value)
Under \(H_0\), \(F\sim F(df_B,df_W)=F(2,12)\). The right-tail p-value is \[ p=P\!\left(F(2,12)\ge 21.71\right)\approx 0.00010. \]
At \(\alpha=0.05\), the critical value is \(F_{0.95}(2,12)\approx 3.885\). Since \(21.71>3.885\) (equivalently \(p<0.05\)), the null hypothesis is rejected.
Conclusion: The group means are not all equal; at least one mean differs.
A one-way ANOVA indicates a difference exists, but it does not identify which pairs differ; a post hoc procedure (e.g., Tukey HSD) is used for pairwise comparisons after significance.
Visualization: F distribution with the observed statistic
The plot shows the \(F(2,12)\) density, the critical value at \(\alpha=0.05\), and the observed \(F\) from the ANOVA table. The shaded region represents the right-tail area used for the p-value.
ANOVA table (summary)
| Source | SS | df | MS | F |
|---|---|---|---|---|
| Between groups | 79.6 | 2 | 39.8 | 21.71 |
| Within groups (error) | 22.0 | 12 | 1.8333 | — |
| Total | 101.6 | 14 | — | — |