One-Way Analysis of Variance (ANOVA) in Completely Randomized Design
by Rao Statistics · Last updated on 1 Nov 2026 · 3.2 One-Way ANOVA
Partitioning total sum of squares, F-distribution test, and post-hoc Tukey HSD testing
Learning Objective
By the end of this lesson: Calculate Treatment Sum of Squares (SST), Error Sum of Squares (SSE), Mean Squares, construct the complete ANOVA table, and test for significant differences among treatment means.
Statistical Theory & Assumptions
One-Way ANOVA tests whether independent treatment group means originate from populations with identical means: The total variability (SSTotal) is partitioned orthogonally into between-group variation (SSTreatment) and within-group error variation (SSError).
Assumptions
- Normal Distribution: Each treatment population follows a normal distribution.
- Homogeneity of Variance: All treatment populations share a common variance
- Independent Random Samples: Experimental units are allocated completely at random to treatments.
Under the ratio of Mean Square Treatment to Mean Square Error follows an F-distribution with degrees of freedom and
Worked Dataset & Variables
Agricultural Crop Yield Across 3 Bio-Fertilizer Treatments: Randomized field trial recording crop yield in metric quintals per hectare across three proprietary fertilizer formulations (Bio-A, Bio-B, Bio-C) with n = 6 plots per treatment. (sample size n = 18).
| Variable | Type | Description |
|---|---|---|
| plot_id | Integer | Experimental plot identifier |
| treatment | Factor | Fertilizer: Bio-A, Bio-B, or Bio-C |
| yield_qha | Numeric | Grain yield in quintals/ha |
| plot_id | treatment | yield_qha |
|---|---|---|
| 1 | Bio-A | 38.2 |
| 2 | Bio-A | 36.8 |
| 3 | Bio-A | 39.5 |
| 4 | Bio-A | 37.1 |
| 5 | Bio-A | 40 |
| 6 | Bio-A | 38.4 |
| 7 | Bio-B | 43.5 |
| 8 | Bio-B | 45 |
| 9 | Bio-B | 42.8 |
| 10 | Bio-B | 44.1 |
| 11 | Bio-B | 46.2 |
| 12 | Bio-B | 43.8 |
| 13 | Bio-C | 32.4 |
| 14 | Bio-C | 34 |
| 15 | Bio-C | 31.8 |
| 16 | Bio-C | 33.5 |
| 17 | Bio-C | 35.1 |
| 18 | Bio-C | 33.2 |
Software Procedure (R, Python & Excel)
# Fit One-Way ANOVA in R
data <- read.csv("fertilizer_yield.csv")
anova_model <- aov(yield_qha ~ treatment, data = data)
summary(anova_model)
# Post-Hoc Tukey Honest Significant Differences (HSD)
TukeyHSD(anova_model)Numerical Results
Group means differ substantially: Bio-B yielded the highest output (mean = 44.23 q/ha), followed by Bio-A (mean = 38.33 q/ha), and Bio-C (mean = 33.33 q/ha).
| Statistic | Value | Note |
|---|---|---|
| Sum of Squares Treatment (SST) | 358.44 | df = 2 |
| Sum of Squares Error (SSE) | 24.18 | df = 15 |
| Mean Square Treatment (MST) | 179.22 | SST / 2 |
| Mean Square Error (MSE) | 1.612 | Pooled within-group variance |
| Observed F-statistic | 111.18 | Critical at is 3.68 |
| p-value | Highly significant |
Interpretation & Decision Rule
Formal conclusion: The null hypothesis of equal fertilizer treatment yields is rejected decisively (F(2, 15) = 111.18, p < 0.001). Post-hoc Tukey HSD reveals that all pairwise contrasts (Bio-B vs Bio-A, Bio-B vs Bio-C, and Bio-A vs Bio-C) are statistically significant at p < 0.01.
Decision rule: Because observed far exceeds critical we conclude there are statistically significant differences among the three fertilizers.
Practical significance: Bio-B provides an average gain of 5.90 quintals/ha over Bio-A and 10.90 quintals/ha over Bio-C, establishing it as the superior agronomic formulation for this soil type.
Family-Wise Error Rate Control: Never replace an ANOVA with multiple two-sample t-tests without correction. Doing so causes inflation of the family-wise type I error rate: which equals 14.3% for three groups at
Practice Files
Download: bio_fertilizer_crd_trial.csv (CSV Dataset, 1.5 KB)