Tukey end-count test (quick test) explained, with an example
The Tukey end-count test, also called Tukey's quick test, compares two groups by looking only at the ends of the combined ranking. You count how many values of one group lie above everything in the other group, add how many values of the other group lie below everything in the first, and compare the total with a few critical counts: about 7 for 5% significance, 10 for 1% and 13 for 0.1%. John Tukey published it in 1959 as a test that can be done in your head, and it is the workhorse of paired comparisons and product/process search.
When to use it
- You want to know whether two groups differ in level, such as two machines, two suppliers or good and bad units.
- You need an answer quickly, from a short list of numbers, without software.
- You do not want to assume a normal distribution.
- You are screening many variables for the one that separates two groups, and you want a consistent score for each.
How it works
- Put all values from both groups in one ordered list.
- Check the ends. If the highest and the lowest values come from the same group, the end count is 0 and the test cannot claim a difference.
- Count from the top. Call the group with the highest value the high group. Count its values that are above every value of the other group.
- Count from the bottom. Count the values of the other group that are below every value of the high group.
- Add the two counts. A value tied with a value of the other group at the boundary counts as one half.
End count = (high-group values above the other group's maximum) + (low-group values below the high group's minimum)- Compare with the critical counts. For two groups of about the same size, Tukey's approximate two-sided critical values are:
| End count of at least | Significance |
|---|---|
| 7 | about 5% |
| 10 | about 1% |
| 13 | about 0.1% |
The exact probabilities depend on the group sizes. Listing every way to divide the ranks between the two groups gives these chances of reaching each count when the groups do not differ:
| Group sizes | P(count ≥ 7) | P(count ≥ 10) | P(count ≥ 13) |
|---|---|---|---|
| 6 and 6 | 0.035 | 0.004 | 0 (12 is the maximum) |
| 8 and 8 | 0.040 | 0.005 | 0.0006 |
| 10 and 10 | 0.043 | 0.006 | 0.0007 |
| 12 and 12 | 0.045 | 0.006 | 0.0008 |
| 6 and 10 | 0.055 | 0.008 | 0.0010 |
For groups of similar size, Tukey's values are slightly conservative. When the sizes differ a lot (6 and 10 above), the same count is a little less significant; Tukey gave a correction for that case, or you can use exact probabilities.
Example
A bottling line has two capping heads. Customers say some caps are too hard to open. The quality technician measures the removal torque of 8 caps from each head (lbf·in):
| Head A | Head B |
|---|---|
| 14.2 | 15.8 |
| 15.1 | 16.3 |
| 13.8 | 14.8 |
| 14.6 | 15.6 |
| 15.4 | 16.9 |
| 14.0 | 15.2 |
| 14.9 | 16.1 |
| 13.5 | 14.1 |
All 16 values in order, with their head:
13.5 A, 13.8 A, 14.0 A, 14.1 B, 14.2 A, 14.6 A, 14.8 B, 14.9 A, 15.1 A, 15.2 B, 15.4 A, 15.6 B, 15.8 B, 16.1 B, 16.3 B, 16.9 B
- The highest value (16.9) is from head B and the lowest (13.5) from head A, so the test applies.
- From the top: head B values above the highest A value (15.4) are 15.6, 15.8, 16.1, 16.3 and 16.9. That is 5.
- From the bottom: head A values below the lowest B value (14.1) are 13.5, 13.8 and 14.0. That is 3.
- End count = 5 + 3 = 8.
How to read the results
- The heads differ. An end count of 8 passes Tukey's 5% critical value of 7. The exact probability of a count of 8 or more with two groups of 8 is 0.020.
- Head B applies more torque. Its median is 15.7 lbf·in against 14.4 for head A. The hard-to-open caps most likely come from head B, so check its torque clutch setting first.
- The result agrees with other tests. An exact Mann-Whitney test on the same data gives a two-sided p-value of 0.015. The end count reaches nearly the same conclusion with mental arithmetic.
- An end count of 0 is not proof of no difference. If one group were simply more variable, holding both the highest and the lowest value, the count would be 0 even though the groups differ. Look at the data, not just the count.
Common mistakes
- Counting from the wrong group. The top count uses the group that holds the highest value; the bottom count uses the other group. If the same group holds both extremes, stop: the count is 0.
- Using it for differences in spread. The test detects a shift in level. Two groups with the same center but different spread give a low count.
- Ignoring very unequal group sizes. With 6 and 10 values, a count of 7 has a chance of 0.055, not below 0.05. Use exact probabilities or Tukey's correction.
- Forgetting ties. A tie at the boundary counts one half, not one. Rounding values heavily creates ties and weakens the test.
Frequently asked questions
Who invented the end-count test?
John W. Tukey, in the 1959 paper "A quick, compact, two-sample test to Duckworth's specifications" in Technometrics. He designed it to be quick enough to do without tables.
How does it compare with the Mann-Whitney test?
Both use ranks and need no normality assumption. The Mann-Whitney test uses all the ranks and is usually more powerful. The end count uses only the ends, which makes it faster and especially good at spotting the complete separation a dominant cause produces.
What sample sizes does the test need?
At least 4 or 5 per group to reach a count of 7 at all; 6 to 10 per group is common. With 3 and 3 values, the largest possible count is 6.
Can I use the end count in a B vs C test?
Yes. The basic B vs C test with 3 and 3 units asks for complete separation. With larger samples you can allow some overlap and judge the result with the end count.