Comparing Two Different Features
When two groups are described on the same quantitative scale, a useful comparison asks two separate questions. Which group tends to have higher values? And which group’s values are more spread out? A center summary answers the first question; a spread summary answers the second. Neither one alone gives a complete comparison.
For instance, two groups might have similar typical completion times, while times in one group vary much more. Or one group might have a higher typical score but less variation. Comparing a center and a spread together makes these distinctions clear. Keep the variable and its units in view: a difference of 2 minutes means something different from a difference of 2 points.
For the examples using quartiles, we will use the median-of-halves convention: order the observations, find the overall median, then find \(Q_1\) and \(Q_3\) as the medians of the lower and upper halves, excluding the overall median when the sample size is odd. Quartile conventions can differ, so a comparison should use the same convention for both groups.
Matching the Summaries to the Comparison
Medians and IQRs provide a resistant description: an unusually high or low observation generally has less influence on them than on the mean and standard deviation. Means and standard deviations use every observation’s distance from the mean, so unusually extreme values can have a substantial influence. When choosing and reporting a comparison, be clear about which pair of summaries you are using; a median should ordinarily be paired with an IQR, and a mean with a standard deviation.
For a group of \(n\) observations \(x_1,\ldots,x_n\), the mean is \(\bar{x}=\frac{1}{n}\sum_{i=1}^{n}x_i\). The sample standard deviation is
The denominator \(n-1\) is used for the sample standard deviation. If the data are being treated as a complete population rather than a sample, the population standard deviation \(\sigma\) uses denominator \(n\) in the variance. In the worked examples below, we use sample standard deviations consistently.
Worked Example: Comparing Medians and IQRs
Suppose two hypothetical groups of seven trainees record the minutes they need to complete a practice task. Group A’s times are 12, 14, 15, 15, 16, 18, and 20 minutes. Group B’s are 10, 13, 14, 17, 18, 19, and 21 minutes. Compare their medians and IQRs.
Both lists are already ordered. For Group A, the middle, fourth observation is 15 minutes, so the median is 15. The lower half is 12, 14, 15, whose median is \(Q_1=14\); the upper half is 16, 18, 20, whose median is \(Q_3=18\). Therefore,
For Group B, the fourth observation is 17 minutes, so its median is 17. The lower half is 10, 13, 14, giving \(Q_1=13\); the upper half is 18, 19, 21, giving \(Q_3=19\). Thus,
Group B has the higher median: its median completion time is 2 minutes greater than Group A’s. Group B also has the greater IQR, by 2 minutes, so the span of its middle half is wider. These are descriptive comparisons of the groups’ centers and middle spreads; they do not say that every person in Group B took longer.
Worked Example: Comparing Means and Standard Deviations
In another hypothetical exercise, two groups of five participants record completion times in minutes. Group C’s times are 4, 6, 8, 10, and 12. Group D’s are 6, 7, 8, 9, and 10. Compare the mean and sample standard deviation for each group.
For Group C, the sum is \(4+6+8+10+12=40\), so \(\bar{x}_C=40/5=8\) minutes. Its squared deviations from the mean are \(16,4,0,4,16\), with sum 40. Therefore,
For Group D, the sum is \(6+7+8+9+10=40\), so \(\bar{x}_D=40/5=8\) minutes as well. The squared deviations from 8 are \(4,1,0,1,4\), with sum 10. Therefore,
The groups have the same mean completion time, 8 minutes, but Group C’s sample standard deviation is larger. In these data, Group C’s times are more dispersed around the mean. Standard deviation is measured in the original units—in this case, minutes—so it can be compared directly with the mean’s units.
Why an Unusual Value Can Change a Comparison
The mean and standard deviation are influenced by how far observations lie from the center. In particular, the standard deviation squares those distances before averaging them. Squaring makes a large distance count much more than a small one. The calculation below justifies a useful identity for finding the sum of squared deviations:
The third line follows from \(\sum x_i=n\bar{x}\). This identity does not change the definition of the sample standard deviation; it provides an equivalent way to calculate its numerator.
Worked Example: A High Value Changes the Mean and Standard Deviation
Consider two hypothetical sets of seven practice scores, in points. Group E’s scores are 4, 5, 5, 6, 6, 7, and 7. Group F’s are 4, 5, 5, 6, 6, 7, and 20. Compare both resistant summaries and means with sample standard deviations.
For each group, the median is 6. Using the median-of-halves convention, the lower half has median \(Q_1=5\), and the upper half has median \(Q_3=7\). Therefore, both groups have \(IQR=7-5=2\) points.
For Group E, the sum is 40 and the sum of squared observations is 236. Its mean is \(40/7\approx5.714\) points. Using the identity just derived, the sum of squared deviations is \(236-40^2/7=52/7\). Thus,
For Group F, the sum is 53 and the sum of squared observations is 587. Its mean is \(53/7\approx7.571\) points. The sum of squared deviations is \(587-53^2/7=1300/7\), so
The median and IQR are unchanged, but the mean rises from about 5.714 to 7.571 points, and the standard deviation rises from about 1.113 to 5.564 points. The score of 20 is much higher than the other scores, so it has a strong effect on summaries based on distances from the mean. This example illustrates why center and spread should be interpreted together and in light of the observations.
How to State a Group Comparison
A clear comparison names both groups, identifies the summaries being compared, reports the values with units, and describes the direction of the differences. For example: “Group B’s median completion time was 17 minutes, 2 minutes higher than Group A’s median of 15 minutes. Its IQR was also larger, 6 minutes compared with 4 minutes.” This reports the center and the spread separately rather than treating them as one conclusion.
A standard deviation or IQR describes variability on the measured scale; it is not a measure of uncertainty in the mean or median. Also, a larger spread does not mean that every observation in that group is farther from the center than every observation in the other group. These summaries compress many observations into a few numbers and do not describe every individual value.
Finally, a descriptive difference alone does not establish why groups differ, whether the difference is statistically significant, or whether a group caused an outcome. Those claims require additional information and methods. Here the goal is narrower: accurately describe how group centers and spreads compare.
Common Mistakes
- Mixing unlike summaries. Comparing one group’s median with another group’s mean does not give a consistent comparison of center. Use the same type of center summary for both groups.
- Reporting only the center. Two groups can have similar centers but different spreads, as Groups C and D illustrate. Report a spread summary when variability is part of the question.
- Calling a higher spread a higher center. A larger IQR or standard deviation means more variability by that measure; it does not mean the group’s values are generally higher.
- Assuming every observation follows the summary. A higher median does not imply that every value in that group exceeds every value in the other group.
- Overlooking unusual observations. Means and standard deviations can be affected strongly by an extreme value. Check the data and interpret these summaries with that sensitivity in mind.
- Turning description into a causal claim. A difference between groups is not, by itself, evidence that group membership caused the difference.
Check Your Understanding
Use the definitions and comparison principles in this tutorial to answer the following.
- Group A has a median of 18 minutes and an IQR of 5 minutes. Group B has a median of 16 minutes and an IQR of 8 minutes. Which group has the higher center, and which has the greater middle spread?
- Two groups have means of 72 points, but their sample standard deviations are 4 points and 9 points. What is the same about their centers, and what differs?
- Why can an unusually high observation change the mean and standard deviation more than the median and IQR?
- Why should a comparison report units for both the center and the spread?
- A group has a higher median than another group. Does this establish that every observation in the first group is higher? Explain.