BCompare groups · Guide test 045
Games–Howell test
Compares all pairs of means allowing unequal variances and sample sizes.
Do it in CodeSplash
In the app, set it up in Analyze with one of these methods:
- One-way ANOVA (Welch / classic) — Do the means of three or more independent groups differ?
- Pairwise comparisons (Tukey, Games–Howell, Dunnett, Dunn, Steel–Dwass …) — Which groups differ from which?
In One-way ANOVA (Welch / classic), choose Post hoc comparisons = Games–Howell. In Pairwise comparisons (Tukey, Games–Howell, Dunnett, Dunn, Steel–Dwass …), choose Comparison = Games–Howell.
Do it in CodeSplash Run this test on your own data, in Python or R.
Bench
Change the design, drag the data, move α. The statistic, its reference distribution and the verdict follow.
Bench · Games–Howell test
Group i has true mean (i − 1) × spread.
Your data
Drag a point or use ↑/↓ to change itIf H₀ were true
- The reference: how q varies across samples when H₀ is true, the studentized range q(4, 12).
- Your statistic, from the data above.
- The p-value: the area at least as extreme as yours (p = .671).
- The hatched rejection region at α = .050: statistics landing here reject H₀.
The whole family
| Pair | Difference in means with 95% simultaneous interval | p | p adj. |
|---|---|---|---|
| .428 | .846 | ||
| .363 | .782 | ||
| .275 | .671 | ||
| .795 | .993 | ||
| .626 | .959 | ||
| .825 | .996 |
6 pairs; adjusted by studentized range, Welch df. The highlighted row is the one in the reference pane (the most extreme by default).
The formula
With your numbers
- each group's own variance (no pooling)
- Welch–Satterthwaite df for the pair
The verdict
q = 1.62, p = .671, Δ = −0.91
p > α = .050: compatible with H₀
Effect size: Group 1 − Group 4 (difference in means) Δ = −0.909
Tukey's studentized range with Welch's standard error and df per pair, so unequal spreads are fine. Slightly liberal in very small groups.
- Statistic
- 1.619
- p-value
- 0.6705
Games–Howell test on Group 1: n = 10; Group 2: n = 10; Group 3: n = 10; Group 4: n = 10: q = 1.62, p = .671, Δ = −0.91. The p-value is above α = .050, so the data are compatible with H₀.
Question and hypotheses
H0ij: μi=μj for each pair of independent groups.
Assumptions
Independent groups and independent observations; approximately normal within group sampling for small sample inference; variances may differ.
Formula
Parameters and notation
k is the group count; ni, x̄i, si² are group summaries; m is the number of pairwise comparisons.
Structure of the method
For every pair, estimate a separate unequal-variance standard error and Welch–Satterthwaite degrees of freedom, then convert the absolute t contrast to the studentized-range scale. The range reference uses the total number of groups and pair-specific degrees of freedom, yielding approximate simultaneous all-pairs comparisons rather than ordinary unadjusted Welch tails.
Estimated and nuisance parameters
Estimate each group mean and variance once, then derive pair-specific mean variances and degrees of freedom. There is no pooled residual variance. Group count defines the simultaneous range family; sample sizes govern pair precision. A pair-specific degree of freedom is calculated, not rounded or selected as a favorable tuning option.
Settings and design choices
Choose all included groups, familywise alpha, and the measurement scale before analysis. Do not append another arbitrary correction to already adjusted p-values without stating the resulting procedure. If only selected planned comparisons are needed, use a suitable contrast-family method rather than silently changing the range family size.
Fitting and adaptation
Recompute all pair statistics when group variances or sample sizes change. A new group alters the multiplicity calibration for old pairs even if their raw data stay fixed. Adaptation to repeated or clustered observations requires covariance-aware contrasts; Games–Howell addresses heteroskedastic independent groups, not general dependence.
Sensitivity and robustness
Very small or highly unbalanced groups can make both variance estimation and the range approximation poor. Extreme observations affect mean and variance simultaneously. Zero variance can create degenerate pairs. Report estimated differences and intervals with the approximate method label, and avoid interpreting nonsignificance as evidence of equal means.
How to use and calibrate
Use qij=√2|tij| and the studentized range with k groups and pair specific νij.
Example application
Compare treatment means when group variances and sample sizes differ.
Interpretation and pitfalls
Watch out
Games–Howell uses an approximation; very small unequal groups can be poorly calibrated.
What changed in edition 2
- New sections: structure of the method, estimated and nuisance parameters, settings and design choices, fitting and adaptation, sensitivity and robustness.
Python and R
Read the matrix of adjusted p-values. This is an independent-group example; Nemenyi also has a separate Friedman/block version. The first factor level is control for many-to-one procedures.
Not run — Python launcher syntax checked; R backend runtime not verified · needs Python standard library + Rscript; R packages: PMCMRplus
# Python launcher for the complete R implementation below.
# Requires Rscript on PATH and the listed R packages.
import shutil
import subprocess
rscript = shutil.which("Rscript")
if rscript is None:
raise RuntimeError("Install R and make Rscript available on PATH.")
r_code = r"""
set.seed(2026)
d <- data.frame(value=c(rnorm(20),rnorm(20,.4),rnorm(20,.8)), group=factor(rep(c("A","B","C"),each=20)))
print(PMCMRplus::gamesHowellTest(value~group,data=d))
"""
# No shell interpolation. A failed R execution raises an error in Python.
result = subprocess.run([rscript, "--vanilla", "-"], input=r_code,
text=True, capture_output=True)
print(result.stdout)
if result.stderr:
print(result.stderr)
result.check_returncode()
Not run — Syntax checked; runtime not verified in the final environment · needs PMCMRplus
set.seed(2026)
d <- data.frame(value=c(rnorm(20),rnorm(20,.4),rnorm(20,.8)), group=factor(rep(c("A","B","C"),each=20)))
print(PMCMRplus::gamesHowellTest(value~group,data=d))
Sources
- PMCMRplus — PMCMRplus · gamesHowellTestAuthor documentation/source reviewed: PMCMRplus 1.9.12.search.r-project.org
- gamesHowellTestsearch.r-project.org
- Statistics guide v4 (historical):
- Python: Python launcher syntax checked; R backend runtime not verified · R: Syntax checked; runtime not verified in the final environment
- Reference's record:
- Edition 2 review: Python: skip · R: not executed (Rscript unavailable); why not run: Python: Python-to-R bridge; Rscript is unavailable. R code was not executed. Python: Not run in the reference's review: Python-to-R bridge; Rscript is unavailable. R code was not executed. R: Reviewed but not run: R wasn't available to the reference's authors.
From the CodeSplash statistics guide (v4), entry 045, updated from the reference's edition 2 (reviewed 14 November 2026) as STAT045.