Grouped data
When numbers are grouped in intervals — e.g. heights from 160 to 170 cm — you do not know each individual number. Then you draw a histogram and a cumulative curve and read the median and quartiles off the curve.
Your numbers
One interval per line: ]150;160]: 3 means «over 150 and up to 160» and that 3 numbers are there. You can also write 150-160: 3.
5 intervals read
More options: axis name
Answer
Mean
173.3
Median
173.3
Quantity
30
Lower quartile · upper quartile
165.6 · 179.6
Interquartile range
13.96
Modal class
]170 ; 180]
The median and quartiles are read off the cumulative curve, and the mean is calculated from the interval midpoints. Both are estimates: the real numbers may lie a little differently inside the intervals.
The dashed guide lines go across from 25 %, 50 % and 75 % to the curve and straight down to the axis, where the quartiles and the median are read off.
How to work it out
- 1Midpoints: 155; 165; 175; 185; 195We do not know the individual numbers — only which interval they are in. So we calculate as if each number lies in the middle of its interval.
- 2Mean = (155 · 3 + 165 · 8 + 175 · 12 + 185 · 5 + 195 · 2) / 30 = 173.3Each midpoint counts as many times as there are numbers in the interval.
- 3Cumulative frequency: 160 → 10 %; 170 → 36.7 %; 180 → 76.7 %; 190 → 93.3 %; 200 → 100 %The cumulative frequency curve passes through these points: at the right end of the interval, this percentage of the numbers has been reached.
- 4Lower quartile: 160 + (25 − 10) / (36.7 − 10) · (170 − 160) = 165.6Find where the curve reaches 25 %, 50 % and 75 %. The curve is a straight line over each interval, so we move the right share of the interval forward.
- 5Median: 170 + (50 − 36.7) / (76.7 − 36.7) · (180 − 170) = 173.3
- 6Upper quartile: 170 + (75 − 36.7) / (76.7 − 36.7) · (180 − 170) = 179.6
The formula
midpoint = (left end + right end) / 2
mean = Σ(midpoint · frequency) / count
An estimate — we assume that the numbers in each interval lie in the middle on average.
quartile = a + (p − F(a)) / (F(b) − F(a)) · (b − a)
Reading off the cumulative curve: a and b are the ends of the interval, F is the cumulative frequency there, and p is 25, 50 or 75 %.
In depth: more numbers and “what if”
Range: 50 (from 150 to 200). Standard deviation from the midpoints: about 10.35.
Table
| Interval | Midpoint | Frequency | Frequency | Cumulative frequency |
|---|---|---|---|---|
| ]150 ; 160] | 155 | 3 | 10 % | 10 % |
| ]160 ; 170] | 165 | 8 | 26.7 % | 36.7 % |
| ]170 ; 180] | 175 | 12 | 40 % | 76.7 % |
| ]180 ; 190] | 185 | 5 | 16.7 % | 93.3 % |
| ]190 ; 200] | 195 | 2 | 6.7 % | 100 % |