Why Summarize Outcomes by Group?
When a quantitative outcome is recorded for several categories, a useful first question is whether the groups have different typical outcomes. For example, a campus service might compare waiting times across service desks, or a class might compare quiz scores across study formats. A strip plot or box plot shows individual values and their distribution; a summary plot can make group comparisons easier to scan, especially when there are many observations.
A summary is useful only if it keeps the important features of the data visible. A group mean describes its arithmetic average, while its median describes the middle observation. Neither number says how tightly the outcomes cluster. Measures of spread, such as the interquartile range or standard deviation, add that information. The shape of a group’s distribution and the presence of unusually large or small values help determine which summaries are most informative.
Means, Medians, and Spread
The mean uses every observed value: add the values in one group and divide by that group’s sample size. It is expressed in the same units as the outcome. A very high or low observation can move the mean substantially because it contributes its full numerical value to the sum.
The median is the central value after sorting the observations. Half the observations are at or below it and half are at or above it, allowing for ties. It is also expressed in the outcome’s units. Because its position in the ordered list matters more than the distance to extreme values, the median is generally less affected by an unusually large or small observation than the mean.
Common spread measures provide different views of variability:
- Range: maximum minus minimum. It uses only the two endpoints and can be changed by a single extreme observation.
- Interquartile range (IQR): the third quartile \(Q_3\) minus the first quartile \(Q_1\). It measures the width of the middle half of the outcomes. Quartile calculations for small samples can differ slightly across conventions or software; a comparison should use one convention consistently.
- Sample standard deviation: the square root of the average squared distance from the group mean, using \(n_j-1\) in the denominator. It is in the outcome’s units and is sensitive to extreme values.
The mean and standard deviation are often a helpful pair when a group’s distribution is roughly symmetric and does not have influential extreme values. The median and IQR are often more useful when a group is strongly skewed or contains an extreme value. These are practical guides, not rules that require one pair in every situation. Showing individual observations as well as summaries can reveal features a pair of numbers misses.
Worked Example: Comparing Means and Medians Across Two Groups
In a hypothetical classroom exercise, students in two study groups complete a short task. Their completion times, in minutes, are: Group A: 4, 6, 6, 8, 10; Group B: 5, 7, 9, 11, 13. Calculate and compare each group’s mean, median, and IQR. For these odd-sized samples, calculate quartiles as the medians of the lower and upper halves after excluding the overall median.
Group A mean. The sum is \(4+6+6+8+10=34\), so \(\bar{y}_A=34/5=6.8\) minutes. The ordered middle value is 6, so the median is 6 minutes. The lower half is 4, 6, with \(Q_1=(4+6)/2=5\); the upper half is 8, 10, with \(Q_3=(8+10)/2=9\). Thus, the IQR is \(9-5=4\) minutes.
Group B mean. The sum is \(5+7+9+11+13=45\), so \(\bar{y}_B=45/5=9\) minutes. The median is 9 minutes. The lower half is 5, 7, giving \(Q_1=6\); the upper half is 11, 13, giving \(Q_3=12\). Thus, the IQR is \(12-6=6\) minutes.
Group B’s mean and median are both 2.2 to 3 minutes higher, respectively, than Group A’s. Its IQR is also 2 minutes wider. A plot of the group medians with IQR bars would show both the shift in typical completion time and the greater middle-half spread in Group B. The IQR bars describe variability among observed times; they are not confidence intervals.
Let the Data Guide the Summary
A useful group comparison reports a measure of center and a measure of spread together. Reporting only a center can conceal that groups differ greatly in variability. Conversely, reporting spread without a center does not show where the outcomes tend to lie. It also matters whether the summaries are being used to describe the observed data or to make an inferential claim: descriptive summaries alone do not establish that a difference is statistically significant or that group membership caused an outcome difference.
A plot should make the summaries and their meaning explicit. For example, plot one point per group for the mean or median, and use a clearly identified range, IQR, or standard-deviation indicator if it suits the comparison. Label categories and the quantitative axis with units. State whether the center is a mean or median, and what the spread marks represent. Avoid presenting one kind of center with another kind of spread without labeling them.
Worked Example: An Extreme Value Changes the Mean More Than the Median
Suppose hypothetical morning and evening groups record the number of minutes spent on a practice task. Morning outcomes are 8, 9, 9, 10, 10, 11, 13. Evening outcomes are 7, 8, 8, 9, 9, 10, 25. Treat 25 minutes as a valid observation, not a data error. Compare the means, medians, and IQRs.
Morning group. The sum is 70, so the mean is \(70/7=10\) minutes. The ordered middle value is 10, so the median is 10 minutes. Excluding that median, the lower half is 8, 9, 9 and the upper half is 10, 11, 13. Therefore, \(Q_1=9\), \(Q_3=11\), and the IQR is \(11-9=2\) minutes.
Evening group. The sum is 76, so the mean is \(76/7\approx10.86\) minutes. The median is 9 minutes. The lower half is 7, 8, 8 and the upper half is 9, 10, 25. Therefore, \(Q_1=8\), \(Q_3=10\), and the IQR is \(10-8=2\) minutes.
The evening mean is about 0.86 minutes higher, but its median is 1 minute lower. The high valid value pulls the mean upward while leaving the median at the center of the ordered observations. The equal IQRs also show that the middle halves have the same width under this quartile convention; they do not imply that the entire distributions are alike. A plot that shows individual observations alongside median and IQR summaries would make the 25-minute value visible.
Constructing and Reading a Summary Plot
A summary plot is a visual comparison, not a replacement for checking the data. Before interpreting it, verify that each group’s summary was calculated from the intended observations, that the response units and axis scale are clear, and that every group is labeled. When group sample sizes differ, include the sample size in a label or accompanying table if it helps readers understand how much data supports each summary.
Choose the plotted center and spread to match the question. A mean with standard-deviation bars focuses on averages and variation around them; a median with IQR bars focuses on the middle of each distribution and is less affected by extremes. These bars do not by themselves show how much uncertainty there is in an estimate of a population quantity. They describe spread among observed outcomes. If the goal is to show distribution shape or individual values, retain a strip plot, box plot, or another display of the observations rather than relying only on one summary point.
For a quick comparison, read the center markers first, then compare the spread indicators. Ask whether groups are separated in typical outcome, whether one group is more variable, and whether the mean and median tell different stories. Describe what the plot shows without claiming more than it supports. For instance, “the observed median waiting time was higher in Group B” is a sample description; it is not by itself evidence that Group B causes longer waits.
Worked Example: Similar Centers but Different Spread
In a hypothetical timed exercise, two groups have completion times in minutes. Group A: 12, 14, 15, 16, 18, 20. Group B: 10, 11, 15, 18, 22, 24. Compare their means, medians, IQRs, and sample standard deviations. For the quartiles, use the medians of the lower and upper halves.
Group A. Its sum is 95, so its mean is \(95/6\approx15.83\) minutes. The median is \((15+16)/2=15.5\) minutes. The lower half, 12, 14, 15, has median \(Q_1=14\); the upper half, 16, 18, 20, has median \(Q_3=18\). Thus, the IQR is \(18-14=4\) minutes. The sum of squared values is \(1545\), so the sum of squared deviations from the mean is \(1545-95^2/6\approx40.83\). Hence \(s_A=\sqrt{40.83/5}\approx2.858\) minutes.
Group B. Its sum is 100, so its mean is \(100/6\approx16.67\) minutes. The median is \((15+18)/2=16.5\) minutes. The lower half, 10, 11, 15, has median \(Q_1=11\); the upper half, 18, 22, 24, has median \(Q_3=22\). Thus, the IQR is \(22-11=11\) minutes. The sum of squared values is \(1830\), so the sum of squared deviations from the mean is \(1830-100^2/6\approx163.33\). Hence \(s_B=\sqrt{163.33/5}\approx5.715\) minutes.
The two groups’ means differ by about 0.83 minutes and their medians by 1 minute, while Group B has a much wider IQR and larger sample standard deviation. A plot of centers alone would hide this difference in variability. A median-and-IQR plot would show that the middle half of Group B’s observed times is much more dispersed.
Why the Overall Mean Is Not Usually the Mean of Group Means
When categories have different sample sizes, the overall mean gives more weight to larger groups. If there are \(k\) categories, the combined mean is the sum of all outcomes divided by the total number of observations:
This follows because the sum of the outcomes in group \(j\) is \(n_j\bar{y}_j\). Adding those group sums gives the total sum; dividing by the total sample size gives the combined mean. Therefore, simply averaging the group means gives the overall mean only when the group sample sizes are equal (or when the means happen to make the two calculations coincide).
For example, if one group has 10 observations with mean 4 and another has 30 observations with mean 8, the combined mean is \((10\cdot4+30\cdot8)/(10+30)=7\), not \((4+8)/2=6\). The group summaries answer a different question from the combined summary: they describe typical outcomes within categories, while the overall mean describes the observations pooled together.
Common Mistake: Treating Every Summary as Interchangeable
A common error is to report group means alone because “the average” seems sufficient, or to draw spread bars without saying what they represent. For example, if a group contains a long right tail, its mean may be pulled above the median; calling that mean the typical experience can be misleading. Similarly, interpreting a standard deviation bar as a confidence interval confuses variability among observations with uncertainty about an estimated population value.
The correction is to examine the group’s observations or distributional display, choose and name an appropriate center and spread, and interpret both in the response’s units. If the mean and median differ noticeably, report that difference rather than selecting one without explanation. Keep conclusions descriptive unless a suitable inferential analysis supports a broader claim.
Check Your Understanding
Try these questions without looking back.
- A group’s outcomes are 3, 4, 4, 5, and 14. Calculate its mean and median. Which is more affected by the value 14?
- Two groups have the same median, but one has a much larger IQR. What does that tell you about their observed outcomes?
- When might a median-and-IQR summary be more informative than a mean-and-standard-deviation summary?
- What information do standard-deviation bars describe, and why should they not automatically be called confidence intervals?
- One group has 8 observations with mean 5, and another has 24 observations with mean 9. Calculate the combined mean and explain why it is not the unweighted average of the two group means.