ANOVA F Test - Analysis of Variance
The ANOVA F-test compares the means across three or more independent groups to test whether at least one group's mean differs from the others. Example: comparing pain scores across three different treatment protocols.
Step 1 — Add your groups
The Data Input panel starts with two empty groups and lets you Add Group as many times as you need. Each group has:
- A group name field (defaults to Group 1, Group 2, etc.)
- A data text area where you paste or type the values
A Remove Group button lets you delete a group you no longer need.
Step 2 — Load data
You have three paths:
- Manual entry in the group text areas
- Excel Import — upload an Excel file; the system maps columns to groups automatically
- Sample Data Generator — pick from four built-in scenarios:
- Drug Dosage Comparison (Pain Reduction, Symptom Relief)
- Teaching Methods (Exam Score, Satisfaction)
- Exercise Type & Cholesterol (LDL Cholesterol, HDL Cholesterol)
- Antibiotic Efficacy (4 Groups)
The Sample Data Generator can also download the chosen scenario as an Excel file.
Step 3 — Calculate ANOVA
Click Calculate ANOVA.
Step 4 — Read the results
The ANOVA Results panel shows:
- F-value
- p-value
- Effect size — Eta-squared (η²) with an interpretation label
- Descriptive Statistics — mean, SD, and n for every group
- ANOVA Summary Table — Source / Sum of Squares / df / Mean Square for Between Groups, Within Groups, and Total
Step 5 — Visualisations
An AnovaCharts panel provides box plots for all groups side by side. Each box plot shows the median, the IQR (Q1–Q3), the whiskers, and individual outliers (using the standard 1.5×IQR fence rule).
Step 6 — Post-hoc comparisons
If ANOVA is significant (p < 0.05) and there are more than two groups, the panel includes a post-hoc comparisons table with each pair of groups compared using two parallel methods:
| Comparison | Tukey HSD | Bonferroni |
|---|---|---|
| Group 1 vs Group 2 | p-value | p-value |
| Group 1 vs Group 3 | p-value | p-value |
| ... | ... | ... |
Step 7 — Discuss with the chatbot
A UniversalChatBot is available at the bottom for interpretation.
Statistical methods used
Test statistic
The one-way ANOVA decomposes total variance into between-groups and within-groups components:
| Component | Formula |
|---|---|
| Grand mean | x̄ = Σ(nᵢ × x̄ᵢ) / N |
| SS_between | Σ nᵢ × (x̄ᵢ − x̄)² |
| SS_within | Σᵢ Σⱼ (xᵢⱼ − x̄ᵢ)² |
| SS_total | SS_between + SS_within |
| df_between | k − 1 (k = number of groups) |
| df_within | N − k |
| MS_between | SS_between / df_between |
| MS_within | SS_within / df_within |
| F-statistic | MS_between / MS_within |
Hypothesis statement
- H₀: μ₁ = μ₂ = ... = μₖ (all group means are equal)
- H₁: At least one μᵢ differs
- Significance level: α = 0.05
Effect size — Eta-squared (η²)
Computed as η² = SS_between / SS_total. Interpretation:
| η² value | Label |
|---|---|
< 0.06 |
Small effect |
0.06 – 0.14 |
Medium effect |
≥ 0.14 |
Large effect |
Post-hoc analysis
Two methods run in parallel when ANOVA is significant and there are more than two groups:
| Method | Approach |
|---|---|
| Tukey HSD | Converts standard t-statistic to studentised range q via q = t × √2, computes p from studentised-range distribution |
| Bonferroni | Multiplies uncorrected pairwise p-value by number of comparisons m = k(k−1)/2, capped at 1.0 |
Error handling
| Condition | Error message |
|---|---|
| Fewer than 2 valid groups | "At least 2 groups with valid data are required" |
| A group has fewer than 2 values | "Each group must have at least two values" |
| Within-group variance is 0 | "Within-group variance is zero. All values in groups are identical." |
| Invalid input value | "Invalid number found in group N" |