One-Way ANOVA
← Hub
NAVIGATION MENU
← Return to All Guides Hub
Unit 5 · Analysis of Variance · Priority 3

One-Way ANOVA & F-Test

The definitive master guide to decomposing total variation into Treatment vs Error, testing $\ge 3$ independent group means simultaneously, avoiding $\alpha$-inflation, and constructing university-grade ANOVA tables.

Family-Wise Error Rate 6-Step Algorithm Dec 2024 (20M Solved) May 2025 (20M Solved) Two-Way ANOVA Included Zero-Scroll Math

01. Intuition: Partitioning of Total Variation

Invented by Sir Ronald A. Fisher, **ANOVA (Analysis of Variance)** tests whether $k \ge 3$ independent population means are equal ($H_0: \mu_1 = \mu_2 = \dots = \mu_k$) by decomposing the total dispersion in the dataset into two orthogonal components:

$$\begin{aligned} \text{Total Sum of Squares (TSS)} = \text{Between Treatments (SSB)} + \text{Within Groups Error (SSW)} \end{aligned}$$ Variance Ratio: $F = \frac{\text{Mean Square Between (Signal)}}{\text{Mean Square Within (Noise)}} = \frac{\text{MSB}}{\text{MSW}}$
Between Treatments · Treatment Effect

SSB / SSTr — The Signal

Measures how much the individual group sample means $\bar{X}_j$ deviate from the grand overall mean $\bar{X}$. Reflects true experimental differences plus sampling noise.

Within Groups · Random Residual

SSW / SSE — The Noise

Measures the internal variation of individual observations $X_{ij}$ around their own group mean $\bar{X}_j$. Reflects purely unexplained random experimental error.

The Core F-Ratio Decision Logic:
• If $H_0$ is true (no treatment effect), $\text{MSB} \approx \text{MSW} \implies F_{\text{calc}} \approx 1.0$.
• If $H_1$ is true (treatments create real differences), $\text{MSB} \gg \text{MSW} \implies F_{\text{calc}} \gg 1.0$.
• When $F_{\text{calc}} > F_{\text{critical}}(k-1, N-k, \alpha)$, we reject $H_0$.

02. Why ANOVA? The Family-Wise Error Problem

A mandatory 5-mark theory question on every semester exam asks: "Why can't we just run multiple two-sample t-tests?"

The Compound Probability Explosion

To compare $k$ group means using pairwise $t$-tests, the number of independent pairwise comparisons is:

$$\begin{aligned} C = \binom{k}{2} = \frac{k(k - 1)}{2} \end{aligned}$$

For $k = 4$ groups, $C = \binom{4}{2} = 6$ individual tests are required.

If each test is performed at significance level $\alpha = 0.05$, the probability of making at least one false positive (Type I error) across the entire experiment explodes into the **Family-Wise Error Rate ($\alpha_{\text{FW}}$)**:

$$\begin{aligned} \alpha_{\text{FW}} &= 1 - (1 - \alpha)^C \\[4pt] &= 1 - (0.95)^6 = 1 - 0.7351 = \mathbf{0.2649 \ (26.49\%)} \end{aligned}$$
The Statistical Disaster: With 4 groups, running pairwise $t$-tests means a 26.5% probability of declaring a fake significant difference purely by chance! ANOVA solves this by conducting a single omnibus $F$-test while strictly capping Type I error at $\alpha = 0.05$.

03. The 6-Step Computational Algorithm

Compute Group Totals & Grand Total ($G$)

Calculate column totals $T_j = \sum x_{ij}$. Then sum them for the Grand Total $G = \sum T_j$. Count total observations $N = \sum n_j$.

Compute the Correction Factor (CF)

$$\begin{aligned} \text{CF} = \frac{G^2}{N} \end{aligned}$$

Calculate Total Sum of Squares (TSS)

Square every single raw value in the table, sum them, and subtract CF:

$$\begin{aligned} \text{TSS} = \sum \sum X_{ij}^2 - \text{CF}, \quad df_{\text{total}} = N - 1 \end{aligned}$$

Calculate Between-Groups Sum of Squares (SSB)

Square each group total, divide by its group size $n_j$, sum them, and subtract CF:

$$\begin{aligned} \text{SSB} = \sum_{j=1}^k \frac{T_j^2}{n_j} - \text{CF}, \quad df_{\text{between}} = k - 1 \end{aligned}$$

Calculate Within-Groups Error Sum of Squares (SSW)

Obtain error SS by simple subtraction (guaranteed exact arithmetic):

$$\begin{aligned} \text{SSW} = \text{TSS} - \text{SSB}, \quad df_{\text{within}} = N - k \end{aligned}$$

Calculate Mean Squares & F-Ratio

$$\begin{aligned} \text{MSB} = \frac{\text{SSB}}{k - 1}, \quad \text{MSW} = \frac{\text{SSW}}{N - k} \implies F_{\text{calc}} = \frac{\text{MSB}}{\text{MSW}} \end{aligned}$$

04. Standard One-Way ANOVA Summary Table Template

In the semester exam, you must draw this table to secure the final 7 marks of the question:

Source of Variation Sum of Squares ($SS$) Degrees of Freedom ($df$) Mean Square ($MS$) Variance Ratio ($F$)
Between Groups (Treatments) $\text{SSB}$ $k - 1$ $\text{MSB} = \frac{\text{SSB}}{k - 1}$ $$F = \frac{\text{MSB}}{\text{MSW}}$$
Within Groups (Error / Residual) $\text{SSW}$ $N - k$ $\text{MSW} = \frac{\text{SSW}}{N - k}$
Total $\text{TSS} = \text{SSB} + \text{SSW}$ $N - 1$ - -
Decision Rule: Look up $F_{\text{crit}}$ with degrees of freedom $\nu_1 = k - 1$ (numerator) and $\nu_2 = N - k$ (denominator).
If $F_{\text{calc}} > F_{\text{crit}}$, Reject $H_0$ and conclude there is a statistically significant difference between group means.

05. F-Test for Equality of Two Variances

Used to test if two independent populations have identical variances ($H_0: \sigma_1^2 = \sigma_2^2$). Also serves as the test of homogeneity of variance before pooling $t$-tests.

$$\begin{aligned} F = \frac{S_1^2}{S_2^2}, \quad \text{where } S_1^2 \ge S_2^2 \end{aligned}$$ Degrees of freedom: Numerator $\nu_1 = n_1 - 1$, Denominator $\nu_2 = n_2 - 1$

Standard Sample Variance Formula:

$$\begin{aligned} S^2 = \frac{\sum (X - \bar{X})^2}{n - 1} = \frac{\sum X^2 - \frac{(\sum X)^2}{n}}{n - 1} \end{aligned}$$

Always place the larger sample variance in the numerator so that calculated $F \ge 1.0$. This allows direct comparison against standard right-tail $F$ tables.

06. 6 Deadly Exam Traps & Common Student Mistakes

Trap 1 · Forgetting to Subtract CF

Treating $\sum X^2$ as TSS

$\text{TSS} \ne \sum \sum X_{ij}^2$. You must subtract the Correction Factor: $\text{TSS} = \sum \sum X^2 - \text{CF}$. Forgetting CF inflates TSS by thousands!

Trap 2 · Wrong Divisor in SSB

Dividing $\sum T_j^2$ by $N$ instead of $n_j$

In $\text{SSB} = \sum \frac{T_j^2}{n_j} - \text{CF}$, the divisor is the group sample size $n_j$ (e.g. 5 or 10), NOT the total sample size $N$!

Trap 3 · Inverted Degrees of Freedom

Looking up $F(16, 3)$ instead of $F(3, 16)$

Numerator $df$ is always Treatment ($k - 1 = 3$). Denominator $df$ is Error ($N - k = 16$). Swapping them gives an incorrect critical cutoff.

Trap 4 · Over-Interpreting Omnibus F

Claiming ANOVA proves *which* pair differs

A significant $F$-test proves only that at least one pair differs. It does not pinpoint the specific pair without post-hoc tests (Tukey's HSD / Scheffe).

Trap 5 · Negative Sum of Squares

Producing a negative SSB or SSW

Sums of squares are squared deviations and can NEVER be negative. If $\text{SSB} < 0$, your CF or $\sum T_j^2 / n$ calculation has an arithmetic error.

Trap 6 · Degrees of Freedom Balance

Failing the Check: $df_B + df_W = df_{\text{total}}$

Always verify: $(k - 1) + (N - k) = N - 1$. For example, $3 + 16 = 19$, or $3 + 36 = 39$. If this sum fails, do not proceed to mean squares.

07. The Complete University Question Bank (All Problems Solved)

Every ANOVA and F-Test question from past semester exams (May 2025, Dec 2024, Nov 2025) and core course syllabus archetypes:

Semester Exam Paper · December 2024 (Question 6 Part i) · 5 Marks

Question 1: Why ANOVA Differs from Multiple t-Tests (5 Marks)

Question Statement (Verbatim):
"Explain how ANOVA differs from t-tests in hypothesis testing. Discuss why ANOVA is preferable when comparing the means of more than two groups. (5 Marks)"

View Complete Theory Model Answer

1. Fundamental Differences:

DimensionTwo-Sample t-TestOne-Way ANOVA (F-Test)
Number of GroupsExactly two groups ($k = 2$)Two or more groups ($k \ge 3$)
Hypotheses$H_0: \mu_1 = \mu_2$$H_0: \mu_1 = \mu_2 = \dots = \mu_k$
Test StatisticStudent's $t$ (ratio of mean diff to SE)Fisher's $F$ (ratio of Between MS to Within MS)
Mathematical RelationFor $k = 2$, the $F$-test is mathematically identical to $t^2$: $F = t^2$.

2. Why ANOVA is Preferable: The Family-Wise Error Rate Problem:

When comparing $k = 4$ groups, conducting pairwise $t$-tests requires $C = \binom{4}{2} = 6$ individual tests. If each test is evaluated at $\alpha = 0.05$, the cumulative Type I error probability across the family of tests is:

$$\begin{aligned} \alpha_{\text{FW}} &= 1 - (1 - \alpha)^C \\[4pt] &= 1 - (0.95)^6 = 1 - 0.7351 = \mathbf{0.2649 \ (26.49\%)} \end{aligned}$$

Conclusion: Running multiple $t$-tests leads to an unacceptably high $26.5\%$ risk of finding false significance. ANOVA avoids this by testing all means simultaneously in a single test, strictly preserving the Type I error at $\alpha = 0.05$.

Semester Exam Paper · December 2024 (Question 6 Part ii) · 15 Marks

Question 2: Photographic Technicians Mistakes One-Way ANOVA (15 Marks)

Question Statement (Verbatim):
"The following data is about the mistakes made by 4 photographic laboratory technicians in 5 successive days. Is there any significant difference in performance among the technicians? (15 Marks)"

DayTech I ($X_1$)Tech II ($X_2$)Tech III ($X_3$)Tech IV ($X_4$)
1414109
21491212
3101278
48101510
511141111
View Complete Step-by-Step Solution & ANOVA Table

1. Group Totals & Grand Total:

  • Tech I Total: $T_1 = 4 + 14 + 10 + 8 + 11 = \mathbf{47}$
  • Tech II Total: $T_2 = 14 + 9 + 12 + 10 + 14 = \mathbf{59}$
  • Tech III Total: $T_3 = 10 + 12 + 7 + 15 + 11 = \mathbf{55}$
  • Tech IV Total: $T_4 = 9 + 12 + 8 + 10 + 11 = \mathbf{50}$
  • Grand Total: $G = 47 + 59 + 55 + 50 = \mathbf{211}$; Total sample size $N = 4 \times 5 = \mathbf{20}$.

2. Correction Factor (CF):

$$\begin{aligned} \text{CF} = \frac{G^2}{N} = \frac{211^2}{20} = \frac{44,521}{20} = \mathbf{2,226.05} \end{aligned}$$

3. Raw Sum of Squares & Total SS (TSS):

$$\begin{aligned} \sum \sum X^2 &= 497 + 717 + 639 + 510 = \mathbf{2,363.0} \\[4pt] \text{TSS} &= 2,363.0 - 2,226.05 = \mathbf{136.95}, \quad df = 20 - 1 = \mathbf{19} \end{aligned}$$

4. Between Technicians SS (SSB):

$$\begin{aligned} \text{SSB} &= \frac{47^2 + 59^2 + 55^2 + 50^2}{5} - \text{CF} \\[4pt] &= \frac{2,209 + 3,481 + 3,025 + 2,500}{5} - 2,226.05 \\[4pt] &= \frac{11,215}{5} - 2,226.05 = 2,243.0 - 2,226.05 = \mathbf{16.95} \\[4pt] df_{\text{between}} &= 4 - 1 = \mathbf{3} \end{aligned}$$

5. Within Technicians SS (SSW / Error):

$$\begin{aligned} \text{SSW} &= \text{TSS} - \text{SSB} = 136.95 - 16.95 = \mathbf{120.00} \\[4pt] df_{\text{within}} &= 20 - 4 = \mathbf{16} \end{aligned}$$

6. One-Way ANOVA Summary Table:

Source of VariationSSdfMean Square (MS)F-RatioCritical $F_{0.05}(3, 16)$
Between Technicians $16.95$ $3$ $\text{MSB} = \frac{16.95}{3} = 5.65$ $$F = \frac{5.65}{7.50} = \mathbf{0.7533}$$ $\mathbf{3.24}$
Within Technicians (Error) $120.00$ $16$ $\text{MSW} = \frac{120.00}{16} = 7.50$
Total136.9519---
Decision & Conclusion:
Critical value at $\alpha = 0.05$ with $df = (3, 16)$ is $\mathbf{3.24}$.
Since $F_{\text{calc}} = 0.7533 < 3.24$, we fail to reject the null hypothesis $H_0$.
There is no statistically significant difference in performance (number of mistakes) among the four laboratory technicians.
Semester Exam Paper · May 2025 (Question 6) · 20 Marks

Question 3: Total Fe Content Across 4 Iron Formations ($\alpha = 0.01$) (20 Marks)

Question Statement (Verbatim):
"Total Fe content was measured in four iron formations (1: Carbonate, 2: Silicate, 3: Magnetite, 4: Hematite) with 10 observations each. Carry out an analysis of variance F-test at significance level 0.01, and summarize the results in an ANOVA table. (20 Marks)"

View Complete Step-by-Step Solution & ANOVA Table

1. Group Totals ($k = 4, n = 10, N = 40$):

  • Formation 1 Total: $T_1 = \mathbf{260.80} \implies \bar{X}_1 = 26.08$
  • Formation 2 Total: $T_2 = \mathbf{246.90} \implies \bar{X}_2 = 24.69$
  • Formation 3 Total: $T_3 = \mathbf{299.50} \implies \bar{X}_3 = 29.95$
  • Formation 4 Total: $T_4 = \mathbf{338.40} \implies \bar{X}_4 = 33.84$
  • Grand Total $G = 260.8 + 246.9 + 299.5 + 338.4 = \mathbf{1,145.60}$

2. Correction Factor (CF):

$$\begin{aligned} \text{CF} = \frac{1,145.60^2}{40} = \frac{1,312,399.36}{40} = \mathbf{32,809.9840} \end{aligned}$$

3. Sums of Squares Calculations:

  • Raw Sum of Squares $\sum \sum X^2 = \mathbf{33,882.2400}$
  • $\text{TSS} = 33,882.2400 - 32,809.9840 = \mathbf{1,072.2560}$ ($df = 39$)
  • $\text{SSB} = \frac{260.8^2 + 246.9^2 + 299.5^2 + 338.4^2}{10} - \text{CF} = 33,319.106 - 32,809.984 = \mathbf{509.1220}$ ($df = 3$)
  • $\text{SSW} = \text{TSS} - \text{SSB} = 1,072.2560 - 509.1220 = \mathbf{563.1340}$ ($df = 36$)

4. One-Way ANOVA Table:

Source of VariationSSdfMean Square (MS)F-RatioCritical $F_{0.01}(3, 36)$
Between Formations $509.1220$ $3$ $\text{MSB} = \frac{509.1220}{3} = \mathbf{169.7073}$ $$F = \frac{169.7073}{15.6426} = \mathbf{10.85}$$ $\mathbf{4.38}$
Within Formations (Error) $563.1340$ $36$ $\text{MSW} = \frac{563.1340}{36} = \mathbf{15.6426}$
Total1072.256039---
Decision & Conclusion ($\alpha = 0.01$):
Critical cutoff value $F_{0.01}(3, 36) \approx \mathbf{4.38}$.
Since $F_{\text{calc}} = 10.85 \gg 4.38$, we reject $H_0$ at the $1\%$ level of significance ($p < 0.0001$).
There is a highly statistically significant difference in mean Fe content among the four iron formations (Hematite is highest at $33.84\%$, Silicate lowest at $24.69\%$).
Semester Exam Paper · November 2025 (Question 6) · 20 Marks

Question 4: Two-Way ANOVA Without Replication (20 Marks)

Question Statement (Verbatim):
"A car manufacturing company evaluates the sales performance of 4 retail dealers (A, B, C, D) over 3 months (I, II, III). Carry out a Two-Way ANOVA test at $\alpha = 0.05$ to determine if there is a significant difference in sales across months and across dealers. (20 Marks)"

Month \ DealerABCDRow Sum ($R_i$)
I50404839$R_1 = \mathbf{177}$
II46485045$R_2 = \mathbf{189}$
III39444039$R_3 = \mathbf{162}$
Col Sum ($C_j$)$C_1 = 135$$C_2 = 132$$C_3 = 138$$C_4 = 123$$G = \mathbf{528}$
View Complete Step-by-Step Two-Way ANOVA Solution

1. Correction Factor (CF): ($r = 3, c = 4, N = 12$)

$$\begin{aligned} \text{CF} = \frac{528^2}{12} = \frac{278,784}{12} = \mathbf{23,232.0} \end{aligned}$$

2. Sums of Squares Decomposition:

  • Raw Sum $\sum X^2 = 23,448.0 \implies \text{TSS} = 23,448 - 23,232 = \mathbf{216.0}$ ($df = 11$)
  • $\text{SSR (Months)} = \frac{177^2 + 189^2 + 162^2}{4} - \text{CF} = 23,323.5 - 23,232 = \mathbf{91.5}$ ($df = 2$)
  • $\text{SSC (Dealers)} = \frac{135^2 + 132^2 + 138^2 + 123^2}{3} - \text{CF} = 23,274 - 23,232 = \mathbf{42.0}$ ($df = 3$)
  • $\text{SSE (Residual)} = \text{TSS} - \text{SSR} - \text{SSC} = 216.0 - 91.5 - 42.0 = \mathbf{82.5}$ ($df = 6$)

3. Two-Way ANOVA Summary Table:

Source of VariationSSdfMS$F_{\text{calc}}$Critical $F_{0.05}$Decision
Months (Rows) $91.5$ $2$ $45.75$ $F_R = \frac{45.75}{13.75} = \mathbf{3.33}$ $F(2, 6) = \mathbf{5.14}$ Fail to Reject $H_0$
Dealers (Cols) $42.0$ $3$ $14.00$ $F_C = \frac{14.00}{13.75} = \mathbf{1.02}$ $F(3, 6) = \mathbf{4.76}$ Fail to Reject $H_0$
Residual Error $82.5$ $6$ $13.75$ - - -
Total216.011----
Conclusions:
1. Months: $F_R = 3.33 < 5.14 \implies$ Monthly sales differences are not statistically significant.
2. Dealers: $F_C = 1.02 < 4.76 \implies$ Performance variations across the four dealers are not statistically significant.
Core Syllabus Archetype · F-Test for Variances

Question 5: Testing Equality of Two Population Variances

Question Statement:
"Two independent manufacturing machines produce steel rods. A sample of 10 rods from Machine A has sample variance $s_1^2 = 25.0$. A sample of 12 rods from Machine B has sample variance $s_2^2 = 10.0$. At $\alpha = 0.05$, test whether Machine A produces significantly more variable rod diameters than Machine B."

View Complete Step-by-Step Solution

1. Formulate Hypotheses:

  • Null Hypothesis: $H_0: \sigma_1^2 = \sigma_2^2$ (Both machines have identical variance).
  • Alternative Hypothesis: $H_1: \sigma_1^2 > \sigma_2^2$ (Right-tailed test).

2. Test Statistic & Degrees of Freedom:

$$\begin{aligned} F_{\text{calc}} = \frac{s_1^2}{s_2^2} = \frac{25.0}{10.0} = \mathbf{2.50} \end{aligned}$$
  • Numerator $df$: $\nu_1 = n_1 - 1 = 10 - 1 = \mathbf{9}$
  • Denominator $df$: $\nu_2 = n_2 - 1 = 12 - 1 = \mathbf{11}$

3. Critical Value Lookup & Decision:

From the standard $F$-distribution table for $\alpha = 0.05$ with $df = (9, 11)$:

$$\begin{aligned} F_{0.05}(9, 11) = \mathbf{2.90} \end{aligned}$$

Since $F_{\text{calc}} = 2.50 < F_{\text{crit}} = 2.90$, we **fail to reject $H_0$**.

Conclusion: There is insufficient statistical evidence at the $5\%$ level to conclude that Machine A produces significantly more variable rods than Machine B.
Interactive Study Tool

Dynamic One-Way ANOVA F-Ratio Calculator

Enter Sums of Squares and degrees of freedom to verify ANOVA calculations instantly:

Loading ANOVA calculations...

08. Interactive Self-Test Quiz (Active Recall)

Test your ANOVA degrees of freedom, F-ratio, and $\alpha$-inflation logic before proceeding. Attempt all 4 questions:

Question 1 — Family-Wise Error Rate ($\alpha_{\text{FW}}$)

If an experiment evaluates $k = 4$ group means using pairwise $t$-tests at $\alpha = 0.05$, how many pairwise tests are required, and what is the approximate Family-Wise Type I error rate?

Correct: 6 tests, $\alpha_{\text{FW}} \approx 26.5\%$.
$C = \binom{4}{2} = 6$. $\alpha_{\text{FW}} = 1 - (1 - 0.05)^6 = 1 - 0.7351 = 0.2649 = 26.49\%$. This illustrates why ANOVA is mandatory.
Question 2 — Degrees of Freedom Identity

A One-Way ANOVA is conducted on $k = 4$ iron formations with $n = 10$ samples in each group ($N = 40$). What are the Between-Groups and Within-Groups degrees of freedom?

Correct: $df_B = 3, df_W = 36$.
$df_{\text{between}} = k - 1 = 4 - 1 = 3$. $df_{\text{within}} = N - k = 40 - 4 = 36$. Check: $3 + 36 = 39 = N - 1$.
Question 3 — F-Test Statistical Decision

In a One-Way ANOVA, the calculated $F = 10.85$ and the critical table value is $F_{0.01}(3, 36) = 4.38$. What is the correct statistical decision?

Correct: Option A.
Since $F_{\text{calc}} = 10.85 > F_{\text{crit}} = 4.38$, the between-group variation is far larger than random error, rejecting $H_0$ decisively at $\alpha = 0.01$.
Question 4 — Meaning of $F \approx 1.0$

What does an ANOVA variance ratio of $F_{\text{calc}} \approx 1.0$ imply?

Correct: Option D.
When $\text{MSB} \approx \text{MSW}$, the differences between group means are entirely consistent with random chance, meaning treatments produced no measurable effect.

Self-Test Progress

0 of 4 correct

09. Exam Hall Answer Sheet Presentation Checklist

When solving an ANOVA problem in the semester exam, follow this exact structure to guarantee maximum marks:

  1. State the Hypotheses: $H_0: \mu_1 = \mu_2 = \dots = \mu_k$ versus $H_1: \text{At least one mean differs}$.
  2. Summary Table: Write group totals $T_j$, sample sizes $n_j$, and Grand Total $G$.
  3. Correction Factor: Write $\text{CF} = \frac{G^2}{N}$ and evaluate.
  4. Total SS: Write $\text{TSS} = \sum X^2 - \text{CF}$ with $df = N - 1$.
  5. Between SS: Write $\text{SSB} = \sum \frac{T_j^2}{n_j} - \text{CF}$ with $df = k - 1$.
  6. Within SS: Write $\text{SSW} = \text{TSS} - \text{SSB}$ with $df = N - k$.
  7. Draw Complete ANOVA Table: Present Source, SS, df, MS, and $F_{\text{calc}}$.
  8. Critical Value & Decision: State $F_{\text{crit}}(k-1, N-k, \alpha)$. State whether $F_{\text{calc}} > F_{\text{crit}}$ and write final English conclusion.
Proceed to Next: 04 · Chi-Square Tests →