AI Glossary / Statistics and probability / Intermediate
Hartley's test
Definition
Hartley's test, also called the F-max test, tests whether several normally distributed populations have equal variances by comparing the largest sample variance with the smallest. Its classical form assumes independent samples of equal size. The reference distribution accounts for choosing the most extreme variances among all groups, so it is not generally the ordinary F distribution for two prespecified sample variances. A nonsignificant result does not prove that the population variances are equal.
What it means
Different groups can have the same average while differing substantially in consistency. Hartley's test focuses on that spread, not on differences between group means. It asks whether the observed largest-to-smallest variance ratio is unusually large under a common-variance model.
The number of groups matters. With more groups, there are more opportunities for sampling variation to produce an unusually high or low sample variance. The common sample size also matters because variances estimated from very few observations are inherently unstable.
The test is easy to calculate, but its convenience should not obscure its distributional assumptions or its limited ability to establish practical equivalence.
How it works
For each of k groups, compute the sample variance s_j^2 using denominator n − 1. Form F_max = max_j(s_j^2)/min_j(s_j^2). Compare it with the Hartley F-max distribution indexed by k and the common degrees of freedom n − 1.
The null hypothesis states that all population variances are equal; the alternative states that at least one differs. Large values of F_max provide evidence against the null. Under independent normal samples with equal population variances, the scaled sample variances are independent chi-squared variables, which supplies the reference distribution for their extreme ratio.
The standard table-based procedure requires equal group sizes. Generalizations exist, but their calibration must match the design. A zero estimated minimum variance makes the ordinary ratio undefined or infinite and requires investigation rather than routine table lookup.
Three practical examples
- A laboratory compares measurement variability across equally replicated instruments under a plausible normal-error model.
- A production analyst checks whether several process settings differ in spread, alongside their mean performance.
- An analytics reviewer verifies that a reported largest-to-smallest variance ratio was calibrated for the number of groups rather than treated as a simple two-group F test.
Think of it this way
Think of comparing the widest and narrowest scatter of darts from several players. A large contrast might suggest different consistency, but with only a few throws per player the apparent contrast can occur by chance. Adding more players also increases the chance of seeing an extreme pair. The statistical reference distribution accounts for those opportunities under its assumptions.
Worked example
Consider three illustrative groups: A = 9, 10, 11; B = 8, 10, 12; and C = 7, 10, 13. All have mean ten and sample size three. Their squared-deviation sums are 2, 8, and 18. Dividing each by two gives sample variances 1, 4, and 9.
Thus F_max = 9/1 = 9, with three groups and two degrees of freedom per variance. For this special null distribution, the upper-tail probability at ratio r is 6/(r + 2) − 3/(2*r + 1). At r = 9, this is 6/11 − 3/19 = 0.3876.
The special-case probability follows from the extreme ratio of three independent two-degree-of-freedom chi-squared variables. Independent simulation with one million such triples gave approximately 0.3878, supporting the arithmetic. At a 5% threshold, the example does not reject equal variances despite its ratio of nine. These tiny constructed samples illustrate weak precision; they do not establish normality or variance equality.
Illustrative case study
In a fictional component laboratory, three calibration benches produce different sample variances from a small pilot. A manager interprets the largest-to-smallest ratio as decisive evidence that one bench is unreliable.
The analyst explains that the reference distribution depends on the number of benches and their limited replication. The team examines raw readings, checks calibration procedures, and plans additional measurements appropriate to its precision requirements. It also defines what size of variance difference would matter operationally. The pilot's nonsignificant test is recorded as inconclusive evidence, not a certificate that all benches perform identically. This scenario illustrates interpretation and study planning, without asserting a real equipment defect.
Common misconceptions and mistakes
Do not use an ordinary two-variance F table after selecting the largest and smallest variances from many groups. Do not replace unequal sample sizes by an arbitrary average and claim the classical test remains exact.
Normality matters because variance ratios are sensitive to heavy tails and outliers. A significant result may reflect a poor distributional model as well as genuine variance differences. A nonsignificant result can arise from low power. Testing variances and then mechanically choosing a mean-comparison method can also create an analysis procedure with properties different from either individual test considered alone.
Business use
Use Hartley's test when its assumptions are credible and its target is relevant to the decision. Report each group's size and variance, the extreme ratio, the reference distribution, and the significance threshold. Pair the numerical result with plots and knowledge of measurement conditions.
For less regular data, consider methods designed to be less sensitive to nonnormality, such as appropriate Levene or Brown - Forsythe procedures. If the practical goal is demonstrating sufficiently similar variability, define that tolerance explicitly; failure to reject exact equality does not establish equivalence within it.
People also ask
Does Hartley's test compare means?
No; it compares population variances.
Why does the number of groups enter the test?
The statistic selects extremes across all groups, which changes its null distribution.
Can equal variances coexist with different means?
Yes. Location and spread are separate distributional features.
Check your understanding
Why is the variance of group C nine rather than eighteen?
Answer: Its squared-deviation sum is divided by n − 1 = 2.
What does the example's p-value imply?
Answer: A ratio at least as large is not rare under the specified equal-variance normal model with such small groups.
Related terms
- Homogeneity of variance
- Sample variance
- F distribution
- Chi-squared distribution
- Brown - Forsythe test
- heteroscedasticity
- Levene's test
- statistical power
Learn next
Next, compare how variance-test results change with replication and group count. Then study robust alternatives and distinguish testing exact equality from assessing a practically acceptable difference in variability.
More in Statistics and probability
- Half-normal distribution - The half-normal distribution describes the absolute value of a normally distributed variable centered at zero.
- Hampel test - A Hampel test, commonly called the Hampel identifier, flags observations that lie unusually far from a median relative to a robust estimate of spread based...
- Harmonic mean - The harmonic mean of positive numbers is the reciprocal of the arithmetic mean of their reciprocals.
- Haseman - Elston regression - Haseman - Elston regression is a family of statistical-genetics methods connecting similarity in quantitative traits with genetic sharing between pairs of...
- Hawthorne effect - The Hawthorne effect refers to a change in behavior or responses arising because people know they are being observed or studied.
- Hazard rate - A hazard rate is the instantaneous rate at which an event occurs at time t among units that have not yet experienced it.
Sources
Sources: Yanagisawa and Shirakawa (1997), “Generalization for the Distribution of Hartley's Fmax Statistic Under Heterogeneity of Variances With Unequal Sample Sizes,” https://www.jstage.jst.go.jp/article/jjscs1988/10/1/10_1_13/_pdf. The primary paper was opened and its classical setting, chi-squared construction, and extension scope checked. The three-group example, special-case tail derivation, independent simulation check, and laboratory scenario are original.
Previous: Harris corner detector Next: Hartley transform