TheoremComplete

Analysis of Variance (ANOVA) and the F-Test

ANOVA decomposes the total variability in the data into components attributable to different sources, enabling simultaneous comparison of multiple group means through a single F-test.


The ANOVA Decomposition

Theorem10.6ANOVA Decomposition

In the linear model, the total sum of squares decomposes as: ∑i=1n(yi−yˉ)2⏟SST=∑i=1n(y^i−yˉ)2⏟SSR+∑i=1n(yi−y^i)2⏟SSE\underbrace{\sum_{i=1}^n (y_i - \bar{y})^2}_{SST} = \underbrace{\sum_{i=1}^n (\hat{y}_i - \bar{y})^2}_{SSR} + \underbrace{\sum_{i=1}^n (y_i - \hat{y}_i)^2}_{SSE} Total variation=Explained variation+Unexplained variation\text{Total variation} = \text{Explained variation} + \text{Unexplained variation} with degrees of freedom n−1=(p−1)+(n−p)n - 1 = (p - 1) + (n - p).


The F-Test

Theorem10.7F-Test for Overall Significance

In the normal linear model, to test H0:β1=β2=⋯=βp−1=0H_0: \beta_1 = \beta_2 = \cdots = \beta_{p-1} = 0 (no predictors are significant): F=SSR/(p−1)SSE/(n−p)=MSRMSE∼Fp−1,n−punder H0F = \frac{SSR/(p-1)}{SSE/(n-p)} = \frac{MSR}{MSE} \sim F_{p-1, n-p} \quad \text{under } H_0 Reject H0H_0 at level α\alpha if F>Fp−1,n−p,αF > F_{p-1, n-p, \alpha}.

ExampleOne-way ANOVA

For kk groups with njn_j observations each, the model is Yij=μj+ϵijY_{ij} = \mu_j + \epsilon_{ij}. Testing H0:μ1=⋯=μkH_0: \mu_1 = \cdots = \mu_k: F=∑jnj(Yˉj−Yˉ)2/(k−1)∑i,j(Yij−Yˉj)2/(N−k)=MSbetweenMSwithin∼Fk−1,N−kF = \frac{\sum_j n_j(\bar{Y}_j - \bar{Y})^2 / (k-1)}{\sum_{i,j}(Y_{ij} - \bar{Y}_j)^2 / (N-k)} = \frac{MS_{\text{between}}}{MS_{\text{within}}} \sim F_{k-1, N-k} For k=3k = 3 groups with n1=n2=n3=10n_1 = n_2 = n_3 = 10: F∼F2,27F \sim F_{2, 27}. At α=0.05\alpha = 0.05, F2,27,0.05=3.35F_{2,27,0.05} = 3.35.


Partial F-Tests

Theorem10.8Partial F-Test for Nested Models

To test whether a subset of predictors is significant, compare the full model (with pp parameters) and the reduced model (with q<pq < p parameters): F=(SSEreduced−SSEfull)/(p−q)SSEfull/(n−p)∼Fp−q,n−pF = \frac{(SSE_{\text{reduced}} - SSE_{\text{full}}) / (p - q)}{SSE_{\text{full}} / (n - p)} \sim F_{p-q, n-p} under H0H_0 (the additional p−qp - q predictors have zero coefficients).

RemarkConnection to individual $t$-tests

When testing a single coefficient βj=0\beta_j = 0, the partial FF-test with p−q=1p - q = 1 gives F=tj2F = t_j^2 where tjt_j is the tt-statistic for βj\beta_j. Thus the tt-test and FF-test are equivalent for testing individual coefficients. However, the FF-test is more general: it can simultaneously test multiple coefficients, which the tt-test cannot.