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 kk independent treatment group means originate from populations with identical means: H0:μ1=μ2=⋯=μk.H_0: \mu_1 = \mu_2 = \cdots = \mu_k\text{.} 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 kk treatment populations share a common variance σ2.\sigma^2\text{.}
  • Independent Random Samples: Experimental units are allocated completely at random to treatments.
F=MSTMSE=SST/(k−1)SSE/(N−k)F = \frac{\text{MST}}{\text{MSE}} = \frac{\text{SST} / (k - 1)}{\text{SSE} / (N - k)}

Under H0,H_0\text{,} the ratio of Mean Square Treatment to Mean Square Error follows an F-distribution with degrees of freedom (k−1)(k - 1) and (N−k).(N - k)\text{.}

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).

Data dictionary
VariableTypeDescription
plot_idIntegerExperimental plot identifier
treatmentFactorFertilizer: Bio-A, Bio-B, or Bio-C
yield_qhaNumericGrain yield in quintals/ha
Sample observations
plot_idtreatmentyield_qha
1Bio-A38.2
2Bio-A36.8
3Bio-A39.5
4Bio-A37.1
5Bio-A40
6Bio-A38.4
7Bio-B43.5
8Bio-B45
9Bio-B42.8
10Bio-B44.1
11Bio-B46.2
12Bio-B43.8
13Bio-C32.4
14Bio-C34
15Bio-C31.8
16Bio-C33.5
17Bio-C35.1
18Bio-C33.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).

Key results
StatisticValueNote
Sum of Squares Treatment (SST)358.44df = 2
Sum of Squares Error (SSE)24.18df = 15
Mean Square Treatment (MST)179.22SST / 2
Mean Square Error (MSE)1.612Pooled within-group variance
Observed F-statistic111.18Critical F(2,15)F(2, 15) at α=0.05\alpha = 0.05 is 3.68
p-value3.12×10−103.12 \times 10^{-10}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 F=111.18F = 111.18 far exceeds critical F0.05(2,15)=3.68,F_{0.05}(2, 15) = 3.68\text{,} 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 α\alpha correction. Doing so causes inflation of the family-wise type I error rate: αFW=1−(1−α)k,\alpha_{FW} = 1 - (1 - \alpha)^k\text{,} which equals 14.3% for three groups at α=0.05.\alpha = 0.05\text{.}

Practice Files

Download: bio_fertilizer_crd_trial.csv (CSV Dataset, 1.5 KB)

You might also like

← 3.2 One-Way ANOVA