Tukey's range test, also known asTukey's test,Tukey method,Tukey's honest significance test, orTukey's HSD (honestly significant difference)test,[1]is a single-stepmultiple comparison procedure andstatistical test. It can be used to correctly interpret thestatistical significance of the difference between means that have been selected for comparison because of their extreme values.
The method was initially developed and introduced byJohn Tukey for use inAnalysis of Variance (ANOVA), and usually has only been taught in connection with ANOVA. However, thestudentized range distribution used to determine the level of significance of the differences considered in Tukey's test has vastly broader application: It is useful for researchers who have searched their collected data for remarkable differences between groups, but then cannot validly determinehow significant their discovered stand-out difference is using standard statistical distributions used for other conventional statistical tests, for which the data must have been selected at random. Since when stand-out data is compared it was by definitionnot selected at random, but rather specifically chosen because it was extreme, it needs a different, stricter interpretation provided by the likely frequency and size of thestudentized range; the modern practice of "data mining" is an example where it is used.
The test was devised byJohn Tukey,[2]it compares all possible pairs ofmeans, and is based on astudentized range distribution (q) (this distribution is similar to the distribution oft from thet-test. See below).[3][full citation needed]
Tukey's test compares the means of every treatment to the means of every other treatment; that is, it applies simultaneously to the set of all pairwise comparisons
and identifies any difference between two means that is greater than the expectedstandard error. Theconfidence coefficient for theset, when all sample sizes are equal, is exactly for any For unequal sample sizes, the confidence coefficient is greater than In other words, the Tukey method is conservative when there areunequal sample sizes.
This test is often followed by theCompact Letter Display (CLD) statistical procedure to render the output of this test more transparent to non-statistician audiences.
Tukey's test is based on a formula very similar to that of thet-test. In fact, Tukey's test is essentially at-test, except that it corrects forfamily-wise error rate.
The formula for Tukey's test is
whereYA andYB are the two means being compared, and SE is thestandard error for the sum of the means. The valueqs is the sample's test statistic. (The notation |x| means theabsolute value ofx; the magnitude ofx with the sign set to+, regardless of the original sign ofx.)
Thisqs test statistic can then be compared to aq value for the chosen significance levelα from a table of thestudentized range distribution. If theqs value islarger than the critical valueqα obtained from the distribution, the two means are said to be significantly different at level[3]
Since thenull hypothesis for Tukey's test states that all means being compared are from the same population (i.e.μ1 =μ2 =μ3 = ... =μk), the means should be normally distributed (according to thecentral limit theorem) with the same modelstandard deviationσ, estimated by the mergedstandard error, for all the samples; its calculation is discussed in the following sections. This gives rise to the normality assumption of Tukey's test.
The Tukey method uses thestudentized range distribution. Suppose that we take a sample of sizen from each ofk populations with the samenormal distributionN(μ,σ2) and suppose that is the smallest of these sample means and is the largest of these sample means, and supposeS2 is thepooled sample variance from these samples. Then the following random variable has a Studentized range distribution:
This definition of the statisticq given above is the basis of the critically significant value forqα discussed below, and is based on these three factors:
( df =N −k ) whereN is the total number of observations.)
The distribution ofq has been tabulated and appears in many textbooks on statistics. In some tables the distribution ofq has been tabulated without the factor. To understand which table it is, we can compute the result fork = 2 and compare it to the result of theStudent's t-distribution with the same degrees of freedom and the sameα .In addition,R offers acumulative distribution function (ptukey) and aquantile function (qtukey)forq .
The Tukeyconfidence limits for all pairwise comparisons with confidence coefficient of at least 1 −α are
Notice that the point estimator and the estimated variance are the same as those for a single pairwise comparison. The only difference between the confidence limits for simultaneous comparisons and those for a single comparison is the multiple of the estimated standard deviation.
Also note that the sample sizes must be equal when using the studentized range approach. is the standard deviation of the entire design, not just that of the two groups being compared. It is possible to work with unequal sample sizes. In this case, one has to calculate the estimated standard deviation for each pairwise comparison as formalized byClyde Kramer in 1956, so the procedure for unequal sample sizes is sometimes referred to as theTukey–Kramer method which is as follows:
wheren i andn j are the sizes of groupsi andj respectively. The degrees of freedom for the whole design is also applied.
Both ANOVA and Tukey–Kramer tests are based on the same assumptions. However, these two tests fork groups (i.e.μ1 =μ2 = ... =μk) may result in logical contradictions whenk > 2 , even if the assumptions do hold.
It is possible to generate a set of pseudorandom samples of strictly negative measure such that hypothesisμ1 =μ2 is rejected at significance level whileμ1 =μ2 =μ3 is not rejected even at[4]