Chip Foundry Services Request Assessment

One-Way Anova

One-way ANOVA tests whether the mean response differs across the levels of one categorical factor. It splits the total variation in the data into variation explained by the factor and leftover within-level noise, then compares the two with an F-statistic. Use it for one factor with $k\ge 3$ independent groups; for $k=2$ it is equivalent to the pooled two-sample t-test.

Model, hypotheses, and the ANOVA table

For observation $i$ at factor level $j$, the standard model is:

$$y_{ij}=\mu+\tau_j+\varepsilon_{ij},\qquad \varepsilon_{ij}\sim N(0,\sigma^2)$$

The null hypothesis is $H_0:\mu_1=\cdots=\mu_k$, or equivalently that every level effect $\tau_j$ is zero. The alternative is that at least one level mean differs. With $n_j$ observations in level $j$, $N=\sum_j n_j$, group means $\bar{y}_j$, and grand mean $\bar{y}=\frac{1}{N}\sum_j n_j\bar{y}_j$, the calculation is organised as:

SourceSum of squaresdfMean squareF
Between levels$SS_B=\sum_j n_j(\bar{y}_j-\bar{y})^2$$k-1$$MS_B=SS_B/(k-1)$$MS_B/MS_W$
Within levels$SS_W=\sum_j\sum_i(y_{ij}-\bar{y}_j)^2$$N-k$$MS_W=SS_W/(N-k)$—
Total$SS_T=SS_B+SS_W$$N-1$——

Under $H_0$ and the model assumptions, $F=MS_B/MS_W$ follows an $F_{k-1,N-k}$ distribution. The p-value is the upper-tail probability $P(F_{k-1,N-k}\ge F_{\text{observed}})$, and the share of variation associated with the factor is $\eta^2=SS_B/SS_T$. Weight the grand mean by group size when the design is unbalanced; a simple average of group means is not the grand mean unless every $n_j$ is equal.

Worked example with unequal group sizes

Three etch recipes give these critical-dimension shifts (nm): recipe A has $12,14,13$; recipe B has $15,17,16,18$; recipe C has $20,19,21,22,23$. The sample sizes are $3,4,5$, so $N=12$ and $k=3$. The group means are $13,\,16.5,\,21$, and the weighted grand mean is $17.5$.

The between-level sum of squares is $SS_B=3(13-17.5)^2+4(16.5-17.5)^2+5(21-17.5)^2=126$. The within-level sum of squares is $SS_W=2+5+10=17$. This gives $MS_B=126/2=63$ and $MS_W=17/9\approx1.889$, so $F=63/(17/9)\approx33.35$ on $(2,9)$ degrees of freedom. The p-value is approximately $6.9\times10^{-5}$ and $\eta^2=126/143\approx0.881$. At least one recipe mean differs; the overall test does not say which.

When the variances are not equal

The classical F-test assumes equal group variances. When sample standard deviations differ noticeably, especially with unequal $n_j$, use Welch's one-way ANOVA. With weights $w_j=n_j/s_j^2$, $W=\sum_j w_j$, and weighted mean $\tilde{y}=\sum_j w_j\bar{y}_j/W$, define $\Lambda=\sum_j\frac{(1-w_j/W)^2}{n_j-1}$. Then:

$$F_W=\frac{\sum_j w_j(\bar{y}_j-\tilde{y})^2/(k-1)}{1+\frac{2(k-2)}{k^2-1}\Lambda},\qquad \nu_2=\frac{k^2-1}{3\Lambda}$$

Compare $F_W$ with an $F$ distribution having $(k-1,\nu_2)$ degrees of freedom. For the example above, Welch's test gives $F_W\approx34.49$ with $(2,5.77)$ degrees of freedom and $p\approx6.2\times10^{-4}$. The conclusion is the same here, but the less-favourable degrees of freedom show how much weaker the evidence is once unequal variances are allowed.

Assumptions and follow-up

  • Observations must be independent, and units should be randomly assigned to levels when the goal is a causal conclusion about the factor.
  • Residuals (each observation minus its group mean) should be roughly normal, with no severe outliers. Check residual plots; the raw pooled data need not be normal.
  • A significant overall F-test is followed by planned contrasts or adjusted pairwise comparisons, such as Tukey's HSD, to identify which levels differ while controlling the family-wise error rate.
  • Report the group means, sample sizes, an effect size such as $\eta^2$, and a confidence interval for important contrasts. A tiny p-value alone does not indicate a practically useful difference.
  • If a second factor or a blocking variable is part of the design, move to a two-way or blocked model rather than ignoring that structure.