Skip to content

ADescribe · Guide test 095

Fligner–Killeen test

Tests scale homogeneity using ranked absolute deviations and normal scores.

Runs in CodeSplashPython example validatedR example validated

Do it in CodeSplash

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

In Equal spread tests, choose Test = Fligner–Killeen.

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 · Fligner–Killeen test

3
15
0.00

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

2.20
0.050

Your data

Drag a point or use ↑/↓ to change it
Group 1 · n = 15 · mean 0.23Group 2 · n = 15 · mean −0.44Group 3 · n = 15 · mean −1.09

If H₀ were true

χ² = 2.16
  1. The reference: how χ² varies across samples when H₀ is true.
  2. Your statistic, from the data above.
  3. The p-value: the area at least as extreme as yours (p = .340).
  4. The hatched rejection region at α = .050: statistics landing here reject H₀.

The formula

χ2=∑jnj(aˉj−aˉ)2sa2,ai=Φ−1 ⁣(1+ri/(N+1)2)\chi^2 = \dfrac{\sum_j n_j(\bar a_j-\bar a)^2}{s_a^2},\qquad a_i = \Phi^{-1}\!\left(\dfrac{1+r_i/(N+1)}{2}\right)

With your numbers

χ2=2.16,ν=2\chi^2 = 2.16,\quad \nu = 2
rir_i
rank of |xᵢ − group median|
aia_i
half-normal scores

The verdict

χ²(2) = 2.16, p = .340

p > α = .050: compatible with H₀

Among the most robust tests of equal variances; preferred when data are skewed or have outliers.

Statistic
2.159
p-value
0.3398
Fligner–Killeen test on Group 1: n = 15; Group 2: n = 15; Group 3: n = 15: χ²(2) = 2.16, p = .340. The p-value is above α = .050, so the data are compatible with H0.

Fligner–Killeen test on Group 1: n = 15; Group 2: n = 15; Group 3: n = 15: χ²(2) = 2.16, p = .340. The p-value is above α = .050, so the data are compatible with H₀.

Question and hypotheses

H0: group scales are equal under a common shape model.

Assumptions

Independent groups; median centering and ranks provide robustness, but comparable shapes are needed for a pure scale interpretation.

Formula

ai=Φ−1(1+Ri/(N+1)2)T=∑jnj(aˉj−aˉ)2sa2\begin{gathered}a_i=\Phi^{-1}\left(\frac{1+R_i/(N+1)}2\right)\\[5pt] T=\frac{\sum_jn_j(\bar a_j-\bar a)^2}{s_a^2}\end{gathered}

Parameters and notation

Ri ranks absolute deviations from each group median; sa² is pooled score variance with denominator N−1.

Structure of the method

Center observations by their group medians, rank pooled absolute deviations, convert those ranks to normal scores, and compare group score means using their pooled score variance. The omnibus quadratic statistic is commonly calibrated with chi-square degrees of freedom equal to the number of groups minus one.

Estimated and nuisance parameters

Estimate medians, deviation ranks, normal-score means, and score variance. Tie groups affect the rank transformation. The result tests a scale-oriented contrast; translating it into a statement solely about population variance assumes comparable distributional shapes.

Settings and design choices

Specify median centering, tie-score convention, group definitions, asymptotic versus a documented conditional variant, and alpha. Different packages can implement related rank-score procedures with different conditioning, so a common method name alone does not establish identical small-sample p-values.

Fitting and adaptation

Recompute centers and rank scores when data or groups change. A simulation assessment should reproduce centering and ties under the intended common-shape scale model. There is no fine-tuning. For clustered groups, use a design-aware extension rather than merely increasing the nominal observation count.

Sensitivity and robustness

Coarse discrete outcomes can create many zero deviations and ties. Different skewness or tail shapes can influence the test even when variance is unchanged. Small groups and unbalanced designs warrant scrutiny. A stable p-value across related robust tests is descriptive evidence, not a multiplicity-free combined test.

How to use and calibrate

Use χ²k−1 asymptotically, or a documented conditional/resampling version.

Example application

Check scale heterogeneity when normality is doubtful.

Interpretation and pitfalls

Watch out

Different shapes or location estimation can influence the statistic; this is not proof that variances are equal when nonsignificant.

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

Variance/scale homogeneity, not a test of equal means. Center choice distinguishes Levene from its median-centered Brown–Forsythe version.

Python · native

Validated — Executed successfully in the validation environment · needs numpy, scipy

import numpy as np
from scipy import stats
rng = np.random.default_rng(2026)
groups = [rng.normal(m,1,20) for m in (0,.4,.8)]
print(stats.fligner(*groups,center="median"))
Output
FlignerResult(statistic=np.float64(5.166188575976257), pvalue=np.float64(0.07553989981209702))
R

Validated — Executed successfully in the validation environment · needs Base/standard library

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(fligner.test(value~group,d))
Output
	Fligner-Killeen test of homogeneity of variances

data:  value by group
Fligner-Killeen:med chi-squared = 0.059532, df = 2, p-value = 0.9707

Sources

Statistics guide v4 (historical):
R: Executed successfully in the validation environment
Reference's record:
Edition 2 review: Python: executed · R: not executed (Rscript unavailable). Python: Ran in the reference's review, on this exact code. R: Reviewed but not run: R wasn't available to the reference's authors.

From the CodeSplash statistics guide (v4), entry 095, updated from the reference's edition 2 (reviewed 14 November 2026) as STAT095.