{
  "id": "tukeys-range-test",
  "title": "Tukey’s Range Test",
  "lang": "en",
  "source_lang": "en",
  "summary": "Tukey’s range test compares all pairs of group means while controlling the family-wise probability of falsely declaring any difference statistically significant.",
  "category": "mathematics",
  "subcategory": "probability-statistics",
  "type": "concept",
  "aliases": [
    "Tukey’s honestly significant difference test",
    "Tukey’s HSD test",
    "Tukey’s test",
    "Tukey’s multiple-comparison test"
  ],
  "generated_at": "2026-11-05",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/tukeys-range-test/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/tukeys-range-test/",
      "json": "https://aiwiki.page/zh/tukeys-range-test.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "Tukey’s range test is a statistical hypothesis test for comparing every pair of means in a collection of groups while controlling the probability of making one or more false-positive conclusions across the entire collection. Developed by John W. Tukey, it is commonly used alongside analysis of variance (ANOVA). The classical procedure, also called the honestly significant difference (HSD) test, assumes independent, normally distributed errors with a common variance. It is exact for equal group sizes; the Tukey–Kramer procedure extends the comparison rule to unequal group sizes."
    },
    {
      "heading": "Purpose and scope",
      "text": "An omnibus one-way ANOVA tests whether all group population means are equal:\n\n\\[H_0:\\mu_1=\\mu_2=\\cdots=\\mu_k.\\]\n\nRejecting this hypothesis establishes evidence that not all means are equal, but does not identify the pairs that differ. Tukey’s test addresses the individual pairwise hypotheses\n\n\\[H_{0,ij}:\\mu_i-\\mu_j=0, \\qquad 1\\leq i<j\\leq k.\\]\n\nThere are \\(k(k-1)/2\\) such comparisons. Conducting each comparison as an ordinary, unadjusted test at the same significance level generally increases the probability of at least one false rejection. This is a multiple-testing problem.\n\nTukey’s procedure controls the family-wise error rate: the probability of rejecting at least one true pairwise null hypothesis. This is a family-level form of protection against Type I errors, rather than a separate error guarantee for each test considered in isolation.\n\nAlthough often described as a post hoc test following a significant ANOVA, its pairwise error control does not require a preliminary significant omnibus test. Requiring both tests to be significant creates an additional decision rule, which can reduce statistical power."
    },
    {
      "heading": "Statistical model and assumptions",
      "text": "For a one-way layout, the standard model is\n\n\\[Y_{ir}=\\mu_i+\\varepsilon_{ir}, \\qquad i=1,\\ldots,k,\\quad r=1,\\ldots,n_i,\\]\n\nwhere \\(n_i\\) is the number of observations in group \\(i\\). The errors are assumed to have:\n\n- Independence: errors are mutually independent within and between groups.\n- Normality: each error follows a normal distribution with mean zero.\n- Equal variances: every group has the same error variance, \\(\\sigma^2\\).\n\nThe model treats group membership as fixed for the comparisons under consideration. Randomization in an experiment can help justify the model, but cannot substitute for accounting for clustering, repeated measurements, or other dependence.\n\nLet \\(\\bar Y_i\\) denote the sample mean of group \\(i\\), and let \\(N=\\sum_i n_i\\). The pooled within-group mean square is\n\n\\[MSE= \\frac{\\displaystyle\\sum_{i=1}^{k} \\sum_{r=1}^{n_i}(Y_{ir}-\\bar Y_i)^2}{N-k}.\\]\n\nIt estimates the common error variance and has\n\n\\[\\nu=N-k\\]\n\nresidual degrees of freedom. Here \\(MSE\\) is the ANOVA residual mean square, not a prediction-error measure from model validation."
    },
    {
      "heading": "Studentized range distribution",
      "text": "The critical values come from the studentized range distribution. Suppose \\(Z_1,\\ldots,Z_k\\) are independent standard normal variables, and \\(S^2\\) is independent of them with\n\n\\[\\nu S^2\\sim\\chi^2_\\nu,\\]\n\nwhere \\(\\chi^2_\\nu\\) denotes the chi-squared distribution with \\(\\nu\\) degrees of freedom. Then\n\n\\[Q=\\frac{\\max_i Z_i-\\min_i Z_i}{S}\\]\n\nhas a studentized range distribution with parameters \\(k\\) and \\(\\nu\\).\n\nWrite \\(q_{1-\\alpha;k,\\nu}\\) for its \\(1-\\alpha\\) quantile. This critical value reflects the most extreme difference among all \\(k\\) means, rather than a single prespecified pair.\n\nFor equally sized groups, the standardized group means have precisely the structure needed for this range distribution. The largest pairwise difference is the difference between the largest and smallest sample means, explaining the name range test."
    },
    {
      "heading": "Equal group sizes: Tukey’s HSD",
      "text": "When each group contains \\(n\\) observations, the honestly significant difference is\n\n\\[HSD=q_{1-\\alpha;k,\\nu} \\sqrt{\\frac{MSE}{n}}.\\]\n\nThe pairwise null hypothesis for groups \\(i\\) and \\(j\\) is rejected when\n\n\\[|\\bar Y_i-\\bar Y_j|>HSD.\\]\n\nEquivalently, the pairwise test statistic is\n\n\\[q_{ij}= \\frac{|\\bar Y_i-\\bar Y_j|} {\\sqrt{MSE/n}},\\]\n\nand rejection occurs when \\(q_{ij}>q_{1-\\alpha;k,\\nu}\\).\n\nThe denominator is not the standard error of the difference between two independent group means. That standard error is \\(\\sqrt{2MSE/n}\\). Tukey’s statistic uses the standard error of one group mean because the studentized range distribution is defined on that scale. Confusing these denominators introduces a factor-of-\\(\\sqrt{2}\\) error.\n\nSimultaneous confidence intervals\n\nThe same procedure produces simultaneous confidence intervals for all pairwise population-mean differences:\n\n\\[\\mu_i-\\mu_j \\in (\\bar Y_i-\\bar Y_j) \\pm q_{1-\\alpha;k,\\nu}\\sqrt{\\frac{MSE}{n}}.\\]\n\nUnder the classical equal-size normal model, the probability that all these intervals cover their respective true differences is \\(1-\\alpha\\). This is a joint coverage statement, not merely a statement about each interval separately.\n\nA pair is statistically significant at the family-wise level \\(\\alpha\\) exactly when its corresponding interval excludes zero. The procedure has strong family-wise error control: protection applies whether all, some, or none of the pairwise null hypotheses are true."
    },
    {
      "heading": "Unequal group sizes: the Tukey–Kramer procedure",
      "text": "For unequal group sizes, the Tukey–Kramer comparison uses\n\n\\[q_{ij} = \\frac{|\\bar Y_i-\\bar Y_j|} {\\sqrt{\\dfrac{MSE}{2} \\left(\\dfrac{1}{n_i}+\\dfrac{1}{n_j}\\right)}}.\\]\n\nThe simultaneous intervals are\n\n\\[(\\bar Y_i-\\bar Y_j) \\pm q_{1-\\alpha;k,\\nu} \\sqrt{\\frac{MSE}{2} \\left(\\frac{1}{n_i}+\\frac{1}{n_j}\\right)}.\\]\n\nWhen \\(n_i=n_j=n\\), these formulas reduce to Tukey’s original equal-size formulas.\n\nUnder independent normal errors with a common variance, Tukey–Kramer provides conservative family-wise error control: its error probability is at most \\(\\alpha\\), rather than generally being exactly \\(\\alpha\\). Unequal sample sizes do not remove the equal-variance assumption.\n\nA Tukey-adjusted p-value for a pair is obtained from the upper tail of the studentized range distribution:\n\n\\[p_{ij,\\mathrm{adj}} = 1-F_{k,\\nu}(q_{ij}),\\]\n\nwhere \\(F_{k,\\nu}\\) is that distribution’s cumulative distribution function. For unequal sizes, this calculation implements the Tukey–Kramer adjustment; the reference distribution is not the exact sampling distribution of every individual pairwise statistic."
    },
    {
      "heading": "Numerical example",
      "text": "Consider three independent groups with ten observations each:\n\n\\[\\bar Y_1=10,\\qquad \\bar Y_2=12,\\qquad \\bar Y_3=13.\\]\n\nSuppose the pooled residual mean square is \\(MSE=4\\). Then \\(\\nu=30-3=27\\). At \\(\\alpha=0.05\\),\n\n\\[q_{0.95;3,27}\\approx3.51,\\]\n\nso\n\n\\[HSD\\approx3.51\\sqrt{\\frac{4}{10}} \\approx2.22.\\]\n\nThe comparisons are therefore:\n\nPair | Absolute mean difference | Exceeds HSD?\nGroups 1 and 2 | \\(2\\) | No\nGroups 1 and 3 | \\(3\\) | Yes\nGroups 2 and 3 | \\(1\\) | No\n\nOnly groups 1 and 3 are declared different at the 5% family-wise level. For example, the interval for \\(\\mu_3-\\mu_1\\) is approximately\n\n\\[3\\pm2.22=[0.78,\\,5.22].\\]\n\nFailure to reject the other two comparisons does not establish that their population means are equal."
    },
    {
      "heading": "Interpretation and reporting",
      "text": "A useful report identifies the groups compared, sample sizes, estimated mean differences, simultaneous confidence intervals, adjusted p-values, family-wise significance level, and whether the equal-size or Tukey–Kramer formulation was used.\n\nThe mean differences and intervals convey magnitude and precision. Statistical significance alone does not establish practical importance; this also requires consideration of effect size and the measurement context.\n\nResults are sometimes summarized using letters: groups sharing a letter have not been declared significantly different. Such displays do not demonstrate equivalence, and their groupings need not be transitive. For example, one group can be nonsignificantly different from two others even when those two differ significantly from each other."
    },
    {
      "heading": "Limitations and related methods",
      "text": "Unequal variances and dependent data\n\nThe pooled variance estimate is central to the method. Substantial variance differences, especially combined with unequal sample sizes, can invalidate its nominal error control. The Games–Howell test is a related all-pairs procedure designed for unequal variances and potentially unequal group sizes, using pair-specific variance estimates and approximate degrees of freedom.\n\nRepeated measurements, clustered observations, and correlated estimated means require methods that account for their dependence. Applying the simple one-way Tukey formula to such data is not justified merely because software labels an adjustment “Tukey.”\n\nChoice of comparison family\n\nTukey’s procedure is tailored to all pairwise differences. It does not automatically protect arbitrary contrasts, multiple outcomes, or additional families of tests. Applying it separately to several outcomes gives separate family-wise guarantees, not necessarily a single guarantee across the entire analysis.\n\nThe Bonferroni correction can accommodate a broader prespecified collection of hypotheses, though it may be more conservative for all-pairs comparisons. When only comparisons against one control are relevant, a procedure designed for that narrower family can provide greater power. Tukey’s control of family-wise error also differs from control of the false discovery rate, which concerns the expected proportion of false rejections among rejected hypotheses.\n\nMore complex models\n\nPairwise comparisons of adjusted means also arise in linear regression, factorial ANOVA, and models containing interactions. In these settings, the covariance structure of the estimated means matters. The exact classical studentized-range justification does not automatically extend to every set of model-adjusted means.\n\nWhen interactions are present, comparisons averaged over another factor can answer a different question from comparisons within its individual levels. The interpretation of a Tukey-adjusted comparison therefore depends both on the error adjustment and on which model means are being compared."
    }
  ],
  "links": [
    "statistical-hypothesis-testing",
    "analysis-of-variance",
    "significance-level",
    "multiple-testing",
    "null-hypothesis",
    "type-i-and-type-ii-errors",
    "statistical-power",
    "statistical-independence",
    "normal-distribution",
    "variance",
    "randomization",
    "sample-mean",
    "degrees-of-freedom",
    "chi-squared-distribution",
    "quantile",
    "test-statistic",
    "standard-error",
    "confidence-interval",
    "p-value",
    "cumulative-distribution-function",
    "effect-size",
    "bonferroni-correction",
    "false-discovery-rate",
    "linear-regression",
    "statistical-interaction"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}