Variance and standard deviation of grouped data
🖨 Print a self-study sheet Why print?
A factory has two machines that fill kg bags of rice. Fifty bags from each machine were weighed and the masses (grams) were grouped:
| Mass (g) | |||||
|---|---|---|---|---|---|
| Machine A | |||||
| Machine B |
Both tables are symmetric about g, so the two machines have the same mean mass. Which machine fills more evenly, and by how much?
The previous lesson used the interquartile range, which looks only at the middle half of the data. This lesson uses every value, through the variance and the standard deviation.
The variance of grouped data
Exploring: how far off is each bag?
We do not know the true mass of each bag, so we replace each bag by the class midpoint of its class: , , , , . Compared with the mean , the deviations are , , , , .
For machine A, bags deviate by , bags by , and so on. Square the deviations (so the signs do not cancel), multiply by the frequencies and take the mean: This number measures how far the bags stray from g. It is exactly the variance of the grouped data.
In this lesson, grouped data have classes with midpoints , …, , frequencies , …, , sample size and mean (grade 11).
Why are the two formulas equal? Expand , multiply by , add up and divide by . Since and , we get , which is the second formula.
The standard deviation has the same unit as the data (grams here), so it is easier to interpret than the variance. The first formula is convenient when is a round number; the second is convenient when it is not.
Step by step with a table
When is not round, we draw up a table with the columns , , , and use the second formula.
When is round, the definition gives small numbers that are easy to work with. The next example completes the exploration.
Comparing two data sets
For two data sets with similar means, the one with the smaller standard deviation is more even. Now we answer the opening question.
The effect of the class width
The standard deviation of grouped data uses midpoints instead of the true values, so it is only an approximate value of the standard deviation of the raw data. The narrower the classes, the closer the midpoints are to the true values.
Key terms
Summary
- Replace each class by its midpoint with frequency .
- ; , in the same unit as the data.
- Draw up a table of , , , ; round only the final result.
- For two data sets with similar means: smaller means more even.
- The of grouped data is an approximate value; narrower classes usually give a better approximation.
Practice
Each exercise comes with what you need and some steps to start. Try it yourself first, then open the solution.
The daily phone use (hours) of students is given in the table. Find and with the definition.
| Time (hours) | ||||
|---|---|---|---|---|
| Students |
What you need: with the midpoints.
Steps:
- Midpoints , , , ; find .
- Find the deviations, square them and multiply by the frequencies.
Show solution
; the deviations are , , , .
Answer. ; hours.
The test marks of students are grouped as follows. Draw up the table and find , , .
| Mark | ||||||
|---|---|---|---|---|---|---|
| Students |
What you need: .
Steps:
- Midpoints , , …, .
- Find and .
Show solution
and .
Answer. ; ; .
Two delivery services P and Q recorded the delivery times (minutes) of orders each.
| Time (minutes) | |||||
|---|---|---|---|---|---|
| Service P | |||||
| Service Q |
Find the mean time and the standard deviation for each service. Which service delivers more reliably on time?
What you need: with equal means, the smaller means more reliable.
Steps:
- Midpoints , , …, . Both tables are symmetric about .
- The deviations are , , , , .
Show solution
Both have minutes.
Answer. Mean minutes; (P) and (Q). Service P is more reliable.
Consider the following grouped data.
| Class | ||||
|---|---|---|---|---|
| Frequency |
Is each claim true or false?
a) The mean is .
b) The variance is .
c) The standard deviation is greater than .
d) If every value is increased by (the classes become , …, ), the variance becomes .
What you need: the variance formula; adding the same number to every value leaves the deviations unchanged.
Steps:
- Midpoints , , , ; find .
- The deviations are , , , .
Show solution
a) True. .
b) True. .
c) False. .
d) False. The midpoints and all increase by , so the deviations are unchanged and the variance is still .
Answer. a) True; b) True; c) False; d) False.
The heights (cm) of students are given in the table. Find the standard deviation (in cm, to two decimal places).
| Height (cm) | |||||
|---|---|---|---|---|---|
| Students |
What you need: ; do not round along the way.
Steps:
- Midpoints , , …, .
- Find , then ; take the square root and round only at the end.
Show solution
, so ; .
Answer. .
(Revisiting the mean of grouped data, grade 11.) The times (minutes) that students took to finish an assignment are given in the table. Find , then .
| Time (minutes) | ||||
|---|---|---|---|---|
| Students |
What you need: with the midpoints; .
Steps:
- Midpoints , , , .
- Find and .
Show solution
Answer. minutes; minutes.
(Revisiting Range and interquartile range of grouped data.) For the two delivery services in Exercise 3, find the interquartile range of each. Is the conclusion the same as with the standard deviation?
What you need: , and likewise for ; positions and .
Steps:
- Cumulative frequencies for P: , , , , ; for Q: , , , , .
- Find , for each service.
Show solution
P: , , .
Q: , , .
Answer. (P) and (Q); the same conclusion as from the standard deviation: P is more reliable.
Grouped data have the following frequency table, where is a positive integer. The mean is . Find , then the variance (to two decimal places).
| Class | ||||
|---|---|---|---|---|
| Frequency |
What you need: with .
Steps:
- Midpoints , , , ; set up the equation .
- With that , find and .
Show solution
Then and :
Answer. ; .
In Example 1 the sleep data have (unit: hours²). If all the data are converted to minutes (every value and every class end multiplied by ), what are the new variance and standard deviation?
What you need: multiplying every value by multiplies and every deviation by .
Steps:
- Each deviation is multiplied by , so its square is multiplied by .
- Deduce the new , then the new .
Show solution
(Check: .)
Answer. (minutes²); minutes.
Mini test
Marked like the Vietnamese graduation exam: Part I 0.25 points per question; Part II up to 1 point per question (1, 2, 3, 4 correct statements give 0.1, 0.25, 0.5, 1 point); Part III 0.5 points per question.
Part I. Multiple choice
The class midpoint is the middle of the class: . Options A and C are the class ends, and option D is the class width.
. Option B squares instead of taking the square root, and option A halves instead of taking the square root.
The variance of the following grouped data is
| Class | ||||
|---|---|---|---|---|
| Frequency |
The class midpoints are , , , and ; the deviations are , , , . . Option B forgets the frequencies, option C is the standard deviation, and option D adds the deviations without squaring them.
With the same mean, a smaller standard deviation means the data are less spread out. The standard deviation does not decide the range for certain, so A is wrong.
Part II. True or false
The weekly running distances (km) of people are given in the table.
| Distance (km) | ||||
|---|---|---|---|---|
| People |
| a) The class midpoint of the class is . | ||
| b) The mean of the data is km. | ||
| c) The variance of the data is . | ||
| d) If every value is converted to a different unit by multiplying by , the new variance is . |
a) True: . b) True: . c) True: and . d) False: every deviation is multiplied by , so the variance is multiplied by and becomes .
Part III. Short answer
The weekly private study times (hours) of students are given in the table. Find the standard deviation of the data, giving your answer to 2 decimal places.
| Time (hours) | ||||
|---|---|---|---|---|
| Students |
The class midpoints are , , , . and , so and , which rounds to .
The lengths (mm) of machine parts are given in the table. Find the variance of the data, giving your answer to 2 decimal places.
| Length (mm) | ||||
|---|---|---|---|---|
| Parts |
The table is symmetric, so ; the deviations are , , , . .
Show answers and explanations
- Part I, question 1: B. The class midpoint is the middle of the class: . Options A and C are the class ends, and option D is the class width.
- Part I, question 2: D. . Option B squares instead of taking the square root, and option A halves instead of taking the square root.
- Part I, question 3: A. The class midpoints are , , , and ; the deviations are , , , . . Option B forgets the frequencies, option C is the standard deviation, and option D adds the deviations without squaring them.
- Part I, question 4: C. With the same mean, a smaller standard deviation means the data are less spread out. The standard deviation does not decide the range for certain, so A is wrong.
- Part II, question 1: a) True; b) True; c) True; d) False. a) True: . b) True: . c) True: and . d) False: every deviation is multiplied by , so the variance is multiplied by and becomes .
- Part III, question 1: 2.65. The class midpoints are , , , . and , so and , which rounds to .
- Part III, question 2: 0.65. The table is symmetric, so ; the deviations are , , , . .