Standard Deviation of Grouped Data
The standard deviation from a frequency table and from grouped data with mid-values, by both forms of the formula and by the calculator's statistics mode with a frequency column; why the answer for grouped data is an estimate.
What You Should Already Know
- From Secondary 2: the mean of a frequency table is . For grouped data, is the mid-value of each class, and the answer is an estimate, because the values in a class are not known. For example, in the class the mid-value is .
- From lesson 3.5: the standard deviation of a list of values is and on a calculator it is σx, not sx.
Standard Deviation from a Frequency Table
In a frequency table, each value occurs times. So in the formulas of lesson 3.5 each squared deviation is counted times, and so is each ; and the number of values is .
The standard deviation of a frequency table
or
means : square the value, then multiply by its frequency. It is not .
Divide by , the number of values, not by the number of rows of the table. The two forms give the same answer.
Example 1: The first form
The table shows the number of children, , in each of 40 families in a block of flats. Find the mean and the standard deviation of the number of children.
| Number of children, | Number of families |
|---|---|
| Total |
Solution
so Each deviation is then a whole number.
Add a column for the deviation and one for , the frequency times the square of the deviation: for , .
| Total |
|---|
The mean is 2 children and the standard deviation about 1.16 children.
Example 2: The second form
Find the standard deviation of the 40 families of Example 1 by the second form of the formula.
Solution
Add columns for and . Each is : for , .
| Total |
|---|
, the same answer as Example 1.
Example 3: A mean that is not a whole number
The table shows the number of goals a school team scored in each of its 20 matches. Find the mean and the standard deviation of the number of goals.
| Goals, | Matches |
|---|---|
| Total |
Solution
The second form avoids decimal deviations.
| Total |
|---|
Mean 1.7 goals; standard deviation 1.1 goals.
Grouped Data
A grouped frequency table gives how many values lie in each class, but not the values themselves. As for the mean in Secondary 2, each value is taken to be at the mid-value of its class. Then the table is treated as a frequency table of the mid-values, and the same formulas give an estimate of the standard deviation.
The standard deviation of grouped data
Take as the mid-value of each class and as its frequency. Then
and (or the first form).
Both answers are estimates: the values in a class are spread out across it, not all at its middle, so the true mean and standard deviation may differ a little. Say so in the answer.
Example 4: Waiting times
The table shows the time, minutes, that 20 patients waited at a polyclinic one morning. Estimate the mean and the standard deviation of the waiting times.
| Time, minutes | Patients |
|---|---|
| Total |
Solution
The mid-values are , then 15, 25, 35 and 45.
| Time, min | ||
|---|---|---|
| Total |
Now work with the mid-values as a frequency table:
| Total |
|---|
minutes.
minutes.
Check by the first form: the deviations from 23.5 are , , 1.5, 11.5 and 21.5.
| Total |
|---|
the same.
The mean waiting time is about 23.5 minutes and the standard deviation about 10.1 minutes (estimates).
Example 5: The estimate and the true value
The times, in seconds, that 20 pupils took to run 200 m (lesson 12.10 of Secondary 2) are 37, 29, 42, 33, 35, 47, 31, 38, 40, 34, 28, 36, 45, 33, 41, 37, 32, 43, 35, 39. (a) Find the standard deviation of the 20 times. (b) Group the times in the classes , , …, and estimate the standard deviation from the table. (c) Compare the two answers.
Solution
(a) By calculator, keying in the 20 times: , , σx
(b) Count the times in each class, and use the mid-values:
| Time, s | ||
|---|---|---|
| Total |
Key the five mid-values into the calculator with the frequencies 2, 5, 7, 4, 2: , and .
and
(c) The estimate, 5.58 s, is close to the true value, 5.05 s, but not equal to it. The table treats the 7 times from 35 to 39 s as seven times of 37.5 s, and so on: the single values are lost.
(a) s (b) s (an estimate) (c) The estimate is close to the true value but not equal, because each time was replaced by its class's mid-value.
Using a Calculator with a Frequency Column
For a table with many rows, use the calculator's statistics mode with its frequency column switched on. Each value (or mid-value) is then keyed in once, with its frequency beside it.
A frequency table on a calculator
1. In the calculator's set-up, switch the frequency column on (it is often called "Frequency" or "Freq"). Choose statistics mode for one variable, and clear any old data.
2. Key in each value (for grouped data, each mid-value) and its frequency .
3. Open the results. Check that equals ; then read and σx (xσn), as in lesson 3.5. Not sx.
With the frequency column on, the calculator's is and its is .
With the frequency column off, the calculator takes each value once, and the answer is wrong.
Example 6: The 80 basketball players
The masses, kg, of the 80 basketball players of lessons 3.1 and 3.2 are grouped in the table. Use a calculator to estimate the mean and the standard deviation of their masses.
| Mass, kg | Players |
|---|---|
| Total |
Solution
The mid-values are 72.5, 77.5, 82.5, 87.5, 92.5 and 97.5.
Key in the six mid-values with the frequencies 3, 8, 16, 21, 19 and 13. The calculator shows (it agrees with ), , , and σx .
| Mass, kg | |||
|---|---|---|---|
| Total |
The table checks the calculator's , which is . By the second form:
The estimated mean, 87.75 kg, is close to the median read from the curve in lesson 3.2, about 88 kg.
The mean mass is about 87.75 kg and the standard deviation about 6.75 kg (estimates).
Common Mistakes
- Dividing by the number of rows (or classes) in place of , the number of values. In Example 4 the divisor is 20 patients, not 5 classes.
- Working out in place of . For , in Example 2: , but .
- Using a class boundary (the lower or upper end of a class) in place of the mid-value.
- Keying the values into the calculator without the frequency column. For Example 1 that gives the standard deviation of 0, 1, 2, 3, 4, each once: 1.41, not 1.16.
- Rounding the mean before the second form. Keep 87.75 exact, not 88, and keep a recurring mean such as 27.166… in the calculator's memory.
- Giving the standard deviation of grouped data as exact. It is an estimate, as the mean is.
- Taking sx (xσn−1) from the calculator. Take σx (xσn).
Practice Questions
Try each question first, then open the solution to check your working. Give each answer to 3 significant figures unless it is exact, and say when it is an estimate.
Question 1
The table shows the number of pets, , owned by each of 30 pupils. Find the mean and the standard deviation by the first form of the formula.
| Number of pets, | Pupils |
|---|---|
| Total |
ShowHide solution
so , and the deviations are , 0, 1 and 2.
| Total |
|---|
Mean 1 pet; standard deviation about 0.894 pets.
Question 2
Thirty pupils answered a quiz marked out of 5. The table shows their marks. Find the mean and the standard deviation of the marks by the second form of the formula.
| Mark, | Pupils |
|---|---|
| Total |
ShowHide solution
| Total |
|---|
Mean 3.1 marks; standard deviation about 1.16 marks.
Question 3
The heights, cm, of 40 seedlings in a school garden are grouped in the table. Estimate the mean and the standard deviation of their heights.
| Height, cm | Seedlings |
|---|---|
| Total |
ShowHide solution
Mid-values 15, 25, 35, 45, 55; then a frequency table of the mid-values.
| Height, cm | ||
|---|---|---|
| Total |
| Total |
|---|
cm
cm
Mean about 35.25 cm; standard deviation about 11.5 cm (estimates).
Question 4
Nurul keyed the values 0, 1, 2, 3, 4 of Example 1 into her calculator and read σx . Explain why her answer is wrong.
ShowHide solution
She did not switch the frequency column on (or left every frequency as 1), so the calculator took each number of children once: five values in place of 40. Its shows 5, not 40.
The standard deviation of 0, 1, 2, 3, 4 is The 40 families give .
The frequencies were left out: each value counted once. With them, .
Question 5
For the times, minutes, that 50 pupils spent on homework one evening, , and . Find the mean and the standard deviation.
ShowHide solution
minutes.
minutes.
Mean 24 minutes; standard deviation about 5.74 minutes.
Question 6
The table shows the number of books, , that some pupils borrowed in a week. The mean is 2.5 books. Find , and then the standard deviation.
| Number of books, | Pupils |
|---|---|
ShowHide solution
and
so and .
| Total |
|---|
; books.
Question 7
The table shows the times, minutes, that 60 commuters spent on the MRT on their way to work. (a) Estimate the mean and the standard deviation of the times. (b) Why are your answers estimates?
| Time, minutes | Commuters |
|---|---|
| Total |
ShowHide solution
(a) Mid-values 5, 15, 25, 35, 45, 55. By calculator with the frequency column: , , .
| Time, min | ||
|---|---|---|
| Total |
| Total |
|---|
minutes.
minutes. (Keep the mean in the calculator's memory; do not round it to 27.2 first.)
(b) Only the classes are known, not the single times. Each time was taken to be at the middle of its class.
(a) Mean about 27.2 minutes; standard deviation about 12.5 minutes (b) because each time was replaced by the mid-value of its class.
Question 8
Wei Jie estimated the standard deviation of the waiting times of Example 4 like this: " What did he do wrong, and how could he have seen that his answer was wrong?
ShowHide solution
He divided by 5, the number of classes, in place of , the number of patients.
His working gives minutes: more than the largest distance of any mid-value from the mean (21.5), which a standard deviation can never be (lesson 3.5).
He divided by the number of classes, 5, not by . The right estimate is about 10.1 minutes.
Question 9
Every frequency in the table of Example 1 is doubled (80 families, in the same proportions). Without working, say what happens to the mean and the standard deviation. Then check with the second form.
ShowHide solution
The mean and the standard deviation depend only on the values and on what fraction of the data each value is. Doubling every frequency keeps the fractions, so neither changes.
Check: , , . and as before.
Neither changes: the mean is still 2 and still about 1.16.
Question 10
A teacher has two records of the same 20 runners' times: the list of 20 times, and the grouped table of Example 5. Which should she use to give the standard deviation, and why? When must she use the table?
ShowHide solution
The list: it gives the true standard deviation, 5.05 s, while the table gives only an estimate, 5.58 s, because it replaces each time by a mid-value.
She must use the table (and say that the answer is an estimate) when only the grouped data are kept, for example when the single times were never written down.
The list, which gives the exact value; the table only when the single values are not known, and then the answer is an estimate.
Key Points
- For a frequency table: and
- is , not ; divide by , not by the number of rows.
- For grouped data, is the mid-value of each class, and the mean and standard deviation are estimates.
- On a calculator, switch the frequency column on, key in each value (or mid-value) with its frequency, check , and take σx.
- Keep the exact mean until the last line; give to 3 significant figures with its units.