One-Way ANOVA

One-way ANOVA is the standard method for comparing the population means of more than two treatments.

If there are $k$ treatments, the hypothesis can be written as

$$ H_0: \mu_1 = \mu_2 = \cdots = \mu_k \quad \text{versus} \quad H_1: \mu_i \ne \mu_j \text{ for some } i \ne j. $$

Under the ANOVA model,

$$ y_{ij} = \mu_i + \varepsilon_{ij} \quad \text{or equivalently} \quad y_{ij} = \mu + \tau_i + \varepsilon_{ij}, $$

where $\tau_i$ is the effect of treatment $i$.

R

fit <- aov(y ~ treatment, data = dat)
summary(fit)