Actuarial Notes

ANOVA

Study guide: Exam MAS-I

Analysis of Variance (ANOVA) is a statistical method for testing whether the means of two or more groups differ by partitioning total variability in the response into explained and unexplained components. Regression output prints the same partition as an ANOVA table for the fitted model, where it tests whether the predictors explain any of the response.

One-Way ANOVA F-Test: F = \frac{\text{MSB}}{\text{MSW}}

= \frac{\text{SS}_\text{Between}/(k-1)}{\text{SS}_\text{Within}/(N-k)} \sim F_{k-1,\, N-k}

ANOVA table structure:

Source SS df MS F
Between groups \text{SS}_B k-1 \text{MS}_B \text{MS}_B/\text{MS}_W
Within groups \text{SS}_W N-k \text{MS}_W
Total \text{SS}_T N-1
  • k = number of groups, N = total observations
  • H_0: all group means are equal; reject if F > F_{\alpha, k-1, N-k}
  • ANOVA is a special case of a linear model: it is equivalent to a regression with indicator variables for group membership
  • When the F test rejects H_0, multiple-comparison procedures (Tukey, Scheffé, Bonferroni) find which means differ; adding a continuous variate to the group indicators gives an Analysis of Covariance model

Regression ANOVA table (fitted model with p predictors and an intercept, n observations):

Source SS df MS F
Regression \text{SSR} = \sum(\hat y_i - \bar y)^2 p \text{MSR} = \text{SSR}/p \text{MSR}/\text{MSE}
Residual (Error) \text{RSS} = \sum(y_i - \hat y_i)^2 n-p-1 \text{MSE} = \text{RSS}/(n-p-1)
Total \text{SS}_\text{Tot} = \sum(y_i - \bar y)^2 n-1
  • The sums of squares and the degrees of freedom both add up: \text{SS}_\text{Tot} = \text{SSR} + \text{RSS} and (n-1) = p + (n-p-1). MSE is \hat\sigma^2
  • F = \text{MSR}/\text{MSE} \sim F_{p,\, n-p-1} under H_0: \beta_1 = \cdots = \beta_p = 0 — the overall test that no predictor is related to the response. The one-way table above is the case where the predictors are the k-1 group indicators: Between is the Regression row (p = k-1), Within is the Residual row
  • A sequential (hierarchical, Type I) table splits the Regression row into one row per predictor in the order it entered the model — \text{SSR}(x_1), then \text{SSR}(x_2 \mid x_1), and so on, each the drop in RSS from adding that term. The rows sum to SSR, and each row's F is its MS over the full model's MSE. Order matters: a predictor's sequential SS is what it adds after the ones above it, which can differ greatly from what it explains alone
  • Analysis of Deviance (the GLM analogue) compares nested Generalized Linear Models by the change in Deviance. The change scaled by the dispersion \phi, [D_{\text{small}} - D_{\text{big}}]/\phi, is asymptotically \chi^2 with degrees of freedom equal to the number of added parameters. For Poisson and binomial \phi = 1, so the raw change in deviance is compared with \chi^2; when \phi is estimated (Normal, Gamma), use the F test F = \dfrac{D_{\text{small}} - D_{\text{big}}}{(\text{number of added parameters}) \times \hat\phi_{\text{big}}} on (added parameters, n - p_{\text{big}}) df, with p_{\text{big}} counting the intercept. For a Normal model the deviance is the RSS and this F is exact

One-Way ANOVA for Claim Severity Across Territories An actuary tests whether mean claim severity differs across three territories using 30 claims (10 per territory). The ANOVA table shows \text{SS}_B = 1{,}200 and \text{SS}_W = 5{,}400. Test at \alpha = 0.05.

Answer \text{MS}_B = 1{,}200/(3-1) = 600; \text{MS}_W = 5{,}400/(30-3) = 200. F = 600/200 = 3.0. The critical value F_{0.05, 2, 27} \approx 3.35. Since 3.0 < 3.35, fail to reject H_0; no significant difference in mean severity across territories at the 5% level.