Skip to content

BCompare groups · Guide test 044

Fisher protected least significant difference

Uses pairwise pooled variance t tests after an omnibus ANOVA; broad strong familywise error control is not guaranteed.

Runs in CodeSplashPython (calls R) example not runR example not run

Do it in CodeSplash

In the app, set it up in Analyze with this method:

In One-way ANOVA (Welch / classic), choose Post hoc comparisons = Fisher's protected LSD. In Pairwise comparisons (Tukey, Games–Howell, Dunnett, Dunn, Steel–Dwass …), choose Comparison = Fisher's protected LSD.

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 · Fisher protected least significant difference

3
10
0.65

Group i has true mean (i − 1) × spread.

1.00
0.050

Your data

Drag a point or use ↑/↓ to change it
Group 1 · n = 10 · mean 0.49Group 2 · n = 10 · mean 0.88Group 3 · n = 10 · mean 1.23

If H₀ were true

t = −1.54
  1. The reference: how t varies across samples when H₀ is true (protected: the one-way F did not reject, so every adjusted p is 1).
  2. Your statistic, from the data above.
  3. The p-value: the area at least as extreme as yours (p = 1.000).
  4. The hatched rejection region at α = .050: statistics landing here reject H₀.

The whole family

PairDifference in means with 95% simultaneous intervalpp adj.
.4291.000
.1351.000
.4661.000

3 pairs; adjusted by protected by the one-way F (F = 1.19, p = .320: the gate is closed, so no pair is declared different). The highlighted row is the one in the reference pane (the most extreme by default).

The formula

tij=xˉi−xˉjMSE(1/ni+1/nj), run only if F rejectst_{ij}=\dfrac{\bar x_i-\bar x_j}{\sqrt{\mathrm{MSE}(1/n_i+1/n_j)}},\ \text{run only if } F \text{ rejects}

With your numbers

t=(−1.54),p=0.13,padj=1t = (-1.54),\qquad p = 0.13,\qquad p_{adj} = 1
FF
the one-way ANOVA F: the gate
MSE\mathrm{MSE}
pooled within-group mean square on N − k df

The verdict

t(27) = −1.54, p = 1.000, Δ = −0.74

p > α = .050: compatible with H₀

Effect size: Group 1 − Group 3 (difference in means) Δ = −0.742

Plain pooled t tests behind the gate of the ANOVA F. With three groups this controls the family-wise error; with more it does not.

Statistic
−1.543
p-value
1.0000
Fisher protected least significant difference on Group 1: n = 10; Group 2: n = 10; Group 3: n = 10: t(27) = −1.54, p = 1.000, Δ = −0.74. The p-value is above α = .050, so the data are compatible with H0.

Fisher protected least significant difference on Group 1: n = 10; Group 2: n = 10; Group 3: n = 10: t(27) = −1.54, p = 1.000, Δ = −0.74. The p-value is above α = .050, so the data are compatible with H₀.

Question and hypotheses

First H0: all means equal; then pairwise H0ij: μi=μj.

Assumptions

Independent normal errors with common variance in a one factor model; group sizes may differ. The family of comparisons must be specified.

Formula

tij=xˉi−xˉjMSE(1/ni+1/nj)t_{ij}=\frac{\bar x_i-\bar x_j}{\sqrt{\mathrm{MSE}(1/n_i+1/n_j)}}

Parameters and notation

MSE and ν=N−k come from the common ANOVA model; α is the prespecified level.

Structure of the method

Run the omnibus common-variance ANOVA at the planned level; only after rejection, run pairwise t contrasts using the same pooled residual mean square and degrees of freedom. This explicit two-stage gate is the protected LSD algorithm. Unconditionally printing ordinary pairwise t tests is not the protected version.

Estimated and nuisance parameters

Estimate group means, pooled residual variance, and the omnibus F statistic. The gate threshold and pairwise alpha are prespecified decision rules. The comparison family remains all requested pairs, even if the output suppresses nonsignificant comparisons; observed gate passage is not an estimated guarantee of strong error control.

Settings and design choices

Specify the omnibus level, follow-up level, group family, and whether any additional adjustment is applied. The baseline deliberately uses p.adj='none' after a gate. Choosing a more favorable gate test or switching follow-up adjustments after observing results creates another selection layer that the historical protection does not cover.

Fitting and adaptation

Recompute the omnibus fit and all gated comparisons after changes in observations or groups. If the intended objective is strong familywise control across many possible partial-null configurations, choose an appropriate simultaneous procedure rather than treating the gate as a universal multiplicity solution. Protocol replication should preserve the originally specified gate.

Sensitivity and robustness

The global-null gate provides limited protection but does not generally ensure strong familywise control for many groups when some effects are real and other pairwise nulls remain true. Common-variance and independence assumptions still matter. Report the omnibus result, gate decision, effect estimates, and the exact follow-up rule transparently.

How to use and calibrate

Perform the omnibus ANOVA first. Only if it rejects, use ordinary pairwise tν tests at α under the protected LSD rule.

Example application

Reproduce a legacy analysis whose protocol explicitly specifies protected LSD.

Interpretation and pitfalls

Watch out

The omnibus gate does not generally provide strong familywise control for many groups. Do not present this as interchangeable with Tukey.

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

The omnibus test is an explicit gate. Protected LSD does not generally provide strong familywise protection across arbitrary numbers of groups.

Python · invokes R

Not run — Python launcher syntax checked; R backend runtime not verified · needs Python standard library + Rscript; R packages: agricolae

# 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)))
fit <- aov(value~group,d); p <- summary(fit)[[1]][["Pr(>F)"]][1]
if(p<.05) print(agricolae::LSD.test(fit,"group",p.adj="none")) else print("Omnibus gate not passed")
"""
# 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()
R

Not run — Syntax checked; runtime not verified in the final environment · needs agricolae

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)))
fit <- aov(value~group,d); p <- summary(fit)[[1]][["Pr(>F)"]][1]
if(p<.05) print(agricolae::LSD.test(fit,"group",p.adj="none")) else print("Omnibus gate not passed")

Sources

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 044, updated from the reference's edition 2 (reviewed 14 November 2026) as STAT044.