F-Statistic Theory and Multiple Comparisons, STAT 212 Ch. 2 (Part A) – Study Notes
offline

Difficulty: Intermediate to Advanced Prerequisites: Part 1 of these notes (One-Way ANOVA Fundamentals). Familiarity with expected value, variance of a sample mean, and unbiased estimators from STAT 211.

Source: Lecture Notes, Chapter 2 (Part A) | Principles of Statistics II, Texas A&M University

Tags: F-statistic motivation, expected value of MSE, expected value of MSTr, unbiased estimator, multiple comparisons, experimentwise error rate, EWER, FWER, Tukey's procedure, Tukey HSD, pairwise comparisons, confidence intervals


Big Picture

Part 1 introduced the ANOVA table and the F-statistic as a ratio of MSTr to MSE. This part answers the deeper question: why does that ratio work? Understanding what MSE and MSTr estimate on average, and how those expectations change depending on whether H_0 is true, is the theoretical backbone of the F-test. The second half of these notes then tackles what comes after a significant F-test: when you know at least one mean differs, how do you figure out which ones, and how do you avoid inflating your error rate while doing so?


TL;DR

MSE always estimates sigma^2 regardless of whether H_0 is true, while MSTr estimates sigma^2 only when all group means are equal; otherwise it estimates something larger. That asymmetry is what makes the F-ratio work. After rejecting H_0, Tukey's procedure provides pairwise confidence intervals that control the overall (experimentwise) error rate, letting you pinpoint which specific means differ.


Key Terms

MSE (mean square error)

SSE divided by (N - k). It is a weighted average of the k group sample variances. Think of it as: your best estimate of the common within-group variance sigma^2, and it stays unbiased whether or not the null hypothesis is true.

MSTr (mean square treatment)

SSTr divided by (k - 1). Under H_0 it estimates sigma^2. When H_0 is false, it estimates sigma^2 plus an additional positive quantity that reflects how far apart the true group means are.

Unbiased estimator

A statistic whose expected value equals the parameter it targets. No systematic over- or under-estimation. In simple terms: if you repeated the experiment many times and averaged the statistic, you would land on the true parameter value.

Experimentwise error rate (EWER)

The probability of rejecting at least one true null hypothesis when performing multiple pairwise tests. Also called the familywise error rate (FWER). Think of it as: the chance of making at least one false alarm across all your comparisons.

Tukey's procedure (Tukey's HSD)

A multiple-comparison method that constructs simultaneous confidence intervals for every pairwise difference mu_i - mu_j, while holding the experimentwise error rate at a chosen level alpha.

Studentised range distribution (Q)

The reference distribution used in Tukey's procedure. Critical values Q_(alpha, k, N-k) are found in Table A.7 of the textbook.


Core Content

Why MSE Is an Unbiased Estimator of sigma^2

Three facts combine to produce this result:

  • Fact 1: MSE is a weighted average of the k group sample variances. Expanding the double sum in SSE group by group:

    SSE = (n_1 - 1) S_1^2 + (n_2 - 1) S_2^2 + ... + (n_k - 1) S_k^2

    so MSE = SSE / (N - k) = [1 / (N - k)] * sum of (n_i - 1) S_i^2.

  • Fact 2: From STAT 211, the sample variance S_i^2 is an unbiased estimator of the population variance for group i.

  • Fact 3: Under the ANOVA model, every group shares the same population variance sigma^2.

Combining these: E(MSE) = sigma^2, and this holds regardless of whether H_0 is true or false. The denominator of the F-ratio is stable no matter what the true means are, which is important because if MSE were biased, our conclusions about group means could be misleading.

What MSTr Estimates

Starting from the model X_ij = mu_i + epsilon_ij, you can decompose the group-mean deviation as:

X-bar_i - X-bar = (mu_i - mu-bar) + (epsilon-bar_i - epsilon-bar)

The first part, (mu_i - mu-bar), is the systematic (true) deviation of group i's mean from the overall weighted mean. The second part, (epsilon-bar_i - epsilon-bar), is random noise.

Squaring and taking expectations through the sum gives:

E(SSTr) = sum of n_i (mu_i - mu-bar)^2 + (k - 1) sigma^2

Dividing by (k - 1):

E(MSTr) = sigma^2 + [1 / (k - 1)] * sum of n_i (mu_i - mu-bar)^2

Two cases follow:

  • Under H_0 (all mu_i equal, so mu_i = mu-bar for every i): the second term vanishes, and E(MSTr) = sigma^2. MSTr and MSE estimate the same thing, so F should hover around 1.

  • Under H_a (at least two mu_i differ): the second term is strictly positive, so E(MSTr) > sigma^2. MSTr is expected to exceed MSE, pushing F above 1.

This is why the test is one-sided (right-tail only), and why F <= 1 never leads to rejection.

Sketch of the Derivation (Expectations of the Noise Terms)

For those who want to follow the algebra shown in lecture:

  • epsilon-bar_i = (1 / n_i) sum of epsilon_ij has variance sigma^2 / n_i, so E(n_i epsilon-bar_i^2) = sigma^2. Summing over k groups: E(sum of n_i epsilon-bar_i^2) = k sigma^2.

  • epsilon-bar = (1 / N) sum of n_i epsilon-bar_i has variance sigma^2 / N, so E(N epsilon-bar^2) = sigma^2, and E(sum of n_i epsilon-bar^2) = sigma^2 (since sum of n_i = N and epsilon-bar^2 does not depend on i).

  • The cross-term 2(mu_i - mu-bar)(epsilon-bar_i - epsilon-bar) has expected value zero because the errors are independent of the fixed means.

  • Putting it together: E(sum of n_i (epsilon-bar_i - epsilon-bar)^2) = k sigma^2 - 2 sigma^2 + sigma^2 = (k - 1) * sigma^2.


The Multiple Comparisons Problem

Once the F-test rejects H_0, you typically want to know which group means differ. This requires testing several pairwise hypotheses of the form H_0: mu_i = mu_j.

The danger is error-rate inflation. If you run m independent tests at level alpha = 0.05 each, the experimentwise error rate (the probability of at least one false rejection when all nulls are true) is:

alpha_E = 1 - (1 - alpha)^m

This grows quickly:

Number of tests (m)

alpha_E (at alpha = 0.05)

1

0.0500

3

0.1426

5

0.2262

10

0.4013

20

0.6415

50

0.9231

With 10 pairwise tests, there is roughly a 40% chance of at least one false positive. With 50 tests, it is over 92%. Running many uncorrected tests virtually guarantees a spurious "significant" result.

Tukey's Procedure (Tukey's HSD)

Tukey's method solves the multiple comparisons problem by building simultaneous confidence intervals that keep the experimentwise error rate at exactly alpha.

Steps:

  1. Choose the desired EWER level alpha (commonly 0.05).

  1. Look up the critical value Q_(alpha, k, N-k) from the studentised range distribution (Table A.7).

  1. For every pair (i, j), compute the confidence interval for mu_i - mu_j:

    (X-bar_i - X-bar_j) +/- Q_(alpha, k, N-k) sqrt[ (MSE / 2) (1/n_i + 1/n_j) ]

  1. For each pair where the interval does not contain zero, reject H_0: mu_i = mu_j. Those two group means are declared significantly different.

The power of Tukey's procedure is that, across all pairwise comparisons simultaneously, the probability of at least one erroneous rejection is controlled at alpha.

Using R for Tukey's Procedure

After fitting the ANOVA model:

fit = aov(Response ~ as.factor(Factors), data = Data)

anova(fit)

Run Tukey's HSD:

TukeyHSD(aov(Response ~ as.factor(Factors), data = Data))

Visualise the intervals:

plot(TukeyHSD(aov(Response ~ as.factor(Factors), data = Data)))

Any interval that does not cross zero indicates a significant pairwise difference.


Formulas / Diagrams

MSE as a Weighted Average of Group Variances

MSE = [1 / (N - k)] sum from i=1 to k of (n_i - 1) S_i^2

Expected Value of MSTr

E(MSTr) = sigma^2 + [1 / (k - 1)] sum from i=1 to k of n_i (mu_i - mu-bar)^2

Experimentwise Error Rate (Independent Tests)

alpha_E = 1 - (1 - alpha)^m

Tukey Confidence Interval for mu_i - mu_j

(X-bar_i - X-bar_j) +/- Q_(alpha, k, N-k) sqrt[ (MSE / 2) (1/n_i + 1/n_j) ]


Real-World Applications

  • In clinical trials with multiple treatment arms, Tukey's procedure (or similar methods) is used to identify which specific drug doses outperform others, without inflating the rate of false claims.

  • In quality control, when a manufacturer tests components from several suppliers, the F-test flags whether suppliers differ, and Tukey's procedure pinpoints which supplier's average lifetime is significantly lower or higher.


Common Misconceptions

  • "If F is close to 1, the group means are exactly equal." F near 1 means the data are consistent with equal means, but it does not prove equality. You simply fail to reject H_0.

  • "You can just run many t-tests instead of ANOVA and Tukey." Running uncorrected pairwise t-tests inflates the experimentwise error rate well above 0.05. With k = 5 groups there are 10 pairs, and the EWER jumps to about 40%.

  • "MSTr is always an unbiased estimator of sigma^2." Only under H_0. When the null is false, E(MSTr) exceeds sigma^2 by a term that depends on how far apart the true means are.

  • "If Tukey's interval for mu_i - mu_j contains zero, the two means are equal." It means you do not have sufficient evidence to declare them different at that confidence level. They may still differ; you may simply lack the power to detect it.


Why It Matters / Exam Flags

  • Be ready to state what MSE and MSTr estimate under H_0 vs under H_a. This is a favourite conceptual question.

  • Know why the F-test is always right-tailed (because MSTr can only be inflated, never deflated, when means differ).

  • Understand the experimentwise error rate formula alpha_E = 1 - (1 - alpha)^m and be able to compute it for a given number of tests.

  • Be able to carry out Tukey's procedure by hand for a small example: look up Q, compute the interval, check whether it contains zero.

  • Know the relevant R commands: aov(), anova(), TukeyHSD(), and plot(TukeyHSD(...)).


Quick Self-Test

1. True or False: E(MSE) = sigma^2 only when H_0 is true.

A: False. E(MSE) = sigma^2 regardless of whether H_0 is true or false.

2. Fill in the blank: When H_0 is false, E(MSTr) = sigma^2 + ______.

A: [1 / (k - 1)] sum of n_i (mu_i - mu-bar)^2.

3. True or False: With 10 independent tests at alpha = 0.05, the experimentwise error rate is about 0.40.

A: True. alpha_E = 1 - (1 - 0.05)^10 = 1 - 0.5987 = 0.4013.

4. Fill in the blank: In Tukey's procedure, you reject H_0: mu_i = mu_j when the confidence interval for mu_i - mu_j does not contain ______.

A: Zero.

5. True or False: Tukey's procedure controls the experimentwise error rate at level alpha.

A: True.


Practice Q&A

Q: Explain in plain language why the F-statistic is expected to be around 1 when all population means are equal.

A: When all means are equal, both MSTr and MSE estimate the same quantity, sigma^2. Their ratio, F = MSTr / MSE, is therefore the ratio of two estimates of the same number, which on average equals 1.

Q: A researcher has k = 4 groups with equal sample sizes and obtains F = 0.83. What should they conclude?

A: Since F <= 1, there is no evidence that the group means differ. The between-group variation is actually smaller than what you would expect from random noise alone, so H_0 is not rejected.

Q: Why is it important that MSE is an unbiased estimator of sigma^2?

A: Because MSE sits in the denominator of the F-statistic. If MSE were systematically too large or too small, the F-ratio would be distorted and our decisions about whether group means differ could be misleading.

Q: Suppose you have k = 6 groups and want to perform all pairwise comparisons. How many pairs are there, and what would the experimentwise error rate be if you ran independent t-tests at alpha = 0.05 each?

A: There are C(6, 2) = 15 pairs. The EWER would be 1 - (1 - 0.05)^15 = 1 - 0.4633 = 0.5367. That is, a roughly 54% chance of at least one false positive.

Q: In Example 12 from the lecture (orange tree yields with k = 5, n = 7 per group), Tukey's procedure found that variety C has a significantly higher average yield than variety A, but no other pair differed significantly. What does this tell you about the ANOVA F-test result?

A: The F-test must have been significant (otherwise you would not proceed to Tukey's). However, the significance was driven primarily by the C vs A difference. The remaining pairwise differences were not large enough to be declared significant after accounting for the multiple comparisons.

Q: Write the R commands needed to run a one-way ANOVA and follow up with Tukey's HSD, assuming the data frame is called Data with columns Response and Factors.

A: fit = aov(Response ~ as.factor(Factors), data = Data); anova(fit); TukeyHSD(aov(Response ~ as.factor(Factors), data = Data))


Connections to Other Topics

  • The expected-value argument for MSTr connects to the general concept of decomposing a statistic into signal plus noise, which reappears in regression (where you decompose SST into SSR + SSE and examine whether the regression sum of squares is "too large" to be noise alone).

  • The experimentwise error rate problem extends beyond ANOVA. It arises whenever you test multiple hypotheses simultaneously, such as in genomics (testing thousands of genes) or A/B testing (running many experiments at once). Corrections like Bonferroni and Benjamini-Hochberg address the same issue in different settings.

  • Tukey's HSD is one of several post-hoc procedures. Others you may encounter include Scheffé's method (more conservative, works for any contrast) and Dunnett's test (compares each treatment to a single control).


Related Terms / Search Tags

F-statistic derivation, expected value of MSTr, expected value of MSE, unbiased estimator of sigma squared, weighted average of sample variances, between-group mean square, within-group mean square, experimentwise error rate, EWER, familywise error rate, FWER, multiple comparisons problem, Tukey's HSD, Tukey's honest significant difference, studentised range distribution, Q critical value, pairwise confidence intervals, post-hoc tests, Bonferroni correction, simultaneous inference, STAT 212, one-way ANOVA theory, R aov function, TukeyHSD R command