Notes on Lesson 2: Variance, standard deviation of grouped data (Maths 12 Canh Dieu, Chapter III)
Lesson summary
Consider grouped data with groups with corresponding frequencies , where , and sample size .
Each term is the square of the difference between the representative value of the th group and the mean, multiplied by the frequency of that group.
A grouped table only tells you how many data values are in each group, not each specific value.
This content is not yet available in English. It is shown below in the original Vietnamese.
- Tính phương sai, độ lệch chuẩn của mẫu số liệu ghép nhóm và giải thích ý nghĩa
Two long jumpers have almost the same average result, but one jumps very consistently while the other sometimes goes far and sometimes falls well short. Looking only at the mean, you cannot tell who is more consistent, so you need another measure of spread. This lesson helps you compute the variance and standard deviation of grouped data, then use them to compare stability or risk in real life.
Key ideas: what do you need to know?
Representative values and the mean of grouped data
Consider grouped data with groups with corresponding frequencies , where , and sample size .
- The representative value of group is the midpoint of the two endpoints of the group: .
- The mean of the grouped data, denoted , is
- Example: group has representative value .
In plain words: A grouped table only tells you how many data values are in each group, not each specific value. So you borrow one number to stand in for the whole group: the midpoint of the group. The narrower the group, the closer that stand-in number is to the true value. The mean is computed by multiplying each representative value by its frequency, then dividing by the sample size, just like computing a weighted average. This is the first step, because to measure how far the values are from the mean, you need the mean first.
Phrase by phrase
- Representative value
- The midpoint of the two endpoints of the group, used in place of every value in the group.Example: Group has representative value .
- Mean
- The average that takes into account the frequency of each group.Example: .
- sample size
- The sum of the class frequencies, which is the total number of data values.Example: Frequency gives .
Common mistakesForgetting to divide by the sample size when computing the variance, only adding the terms and stopping there.
TipThe class representative value is the midpoint: take the average of the two endpoints, not an endpoint.
Variance of grouped data
The variance of grouped data, denoted , is computed by the formula where is the representative value, is the class frequency of the th group, is the sample size and is the mean.
- An equivalent shortcut formula:
- Each term is the square of the difference between the representative value of the th group and the mean, multiplied by the frequency of that group.
- Example: with , then .
In plain words: The variance is the average of the squares of the distances from each representative value to the mean. Picture the mean as a marker post, with each group standing a distance from it; squaring makes distances on the left and on the right both positive, then you average by frequency. Groups far from the marker post contribute more, so a large variance means the data is spread out. The second formula is handy for hand calculation because you only square the representative values once, but remember to subtract , not .
Phrase by phrase
- Variance
- A measure of how spread out the sample is around the mean, with units that are the square of the unit of measurement.Example: Measured in cm, has units of .
- The square of the distance from the representative value of a group to the mean.Example: , gives .
- class frequency of the th group
- The number of data values falling in that group, denoted , showing how much the group contributes to the variance.Example: A group with frequency 8 has its term multiplied by 8.
Common mistakesIgnoring frequency, adding the squares of the representative values of each class exactly once, so a class with many data values does not contribute its proper share.
TipCompute the variance using so that each representative value is squared only once, which makes sign errors less likely.
Standard deviation of grouped data
The standard deviation of grouped data, denoted , is the principal square root of the variance of the grouped data, that is
- The standard deviation has the same unit of measurement as the original data, so it is easier to read than the variance.
- Example: if then .
- To compute , first compute and then take the square root; there is no other separate formula.
In plain words: The variance squares the distances, so its units get distorted: measured in cm, the variance comes out in cm, which is hard to picture. Taking the square root brings it back to the original unit, like measuring the actual average deviation. That is why when reporting to others, people usually give the standard deviation: a deviation of about cm sounds clearer than a variance of . These two numbers always go together, large together and small together, so computing either one correctly gives you the other.
Phrase by phrase
- Standard deviation
- The principal square root of the variance, in the same unit as the data.Example: .
- principal square root
- The root is non-negative, so .Example: , do not take .
- in the same unit of measurement as the original data
- If the data is in millions of dong, then is also in millions of dong.Example: million dong.
TipQuick check: the variance must be non-negative; if you get a negative number, you made a mistake in the subtraction step.
Meaning of variance and standard deviation
- The variance and standard deviation of grouped data are approximations of the variance and standard deviation of the original data sample, used to measure the spread of that grouped data.
- The larger the variance and standard deviation, the more spread out the data sample, that is, the values are farther apart from each other and farther from the mean; the smaller they are, the more the values cluster around the mean.
- The standard deviation has the same unit as the data sample.
- When two grouped data samples have the same unit of measurement and equal (or approximately equal) means, the sample with the smaller standard deviation has a lower spread (relative to the mean) of its data.
In plain words: Two classes both have a mean score of 7, but the class with a student scoring 10 and a student scoring 4 has a large variance, while the class with only 6, 7, 8 has a small variance. So variance does not say good or bad, it says even or uneven. Remember one thing: the mean tells you the middle position, while variance and standard deviation tell you whether the data cluster or spread out around that middle position. Because grouped data has lost the detail of each value, the numbers you compute are only approximations, so do not be surprised when they differ a little from computing on the original data. Also do not forget the condition for comparison: the units of measurement must be the same and the means must be equal or approximately equal.
Phrase by phrase
- approximately
- Close, not exactly correct, because the whole group has been replaced by the representative value.Example: Computing on the grouped table gives , computing on the original data may give 5.03.
- measure the spread
- Tells whether the data cluster or spread out around the mean.Example: small: the values are close together.
- the larger it is, the more spread out the data sample
- Compare two samples: the one with the larger is more uneven.Example: so sample is more spread out than sample .
- have the same unit of measurement
- Only compare standard deviations directly when the two samples have the same unit.Example: If both are measured in cm, you can compare; cm with kg, you cannot.
Common mistakesTaking the left endpoint or the right endpoint of a class as the representative value, while the representative value must be the midpoint of the two endpoints.
Common mistakesComparing the standard deviations of two samples with different units of measurement or with means that differ greatly, or concluding that something is riskier just because its mean is greater.
Use standard deviation to compare risk and stability
When two grouped data samples have the same unit of measurement and equal or approximately equal means:
- The sample with the larger standard deviation has results that fluctuate more, so it is riskier (for investment) or less stable (for measurement, production).
- The sample with the smaller standard deviation has more stable results, more reliable.
- The conclusion must be based on the computed data: state clearly the comparison of of the two samples, then draw the remark.
- Example: two investment fields , have the same mean amount earned million dong per month, but while . So investing in field is riskier.
In plain words: Two people have the same mean profit, but one sometimes loses a lot and sometimes gains a lot, while the other gains steadily. Who is riskier? The one who fluctuates strongly, and it is the large standard deviation that reflects this. The same goes for measuring devices: two devices give the same mean power, and the one with the smaller standard deviation has readings that jump less, more reliable. Remember: to compare stability, look at , small means clustered, large means spread out. But remember the condition: if two options have very different mean profits, you should not use standard deviation to compare risk.
Phrase by phrase
- riskier
- Results fluctuate strongly, you may lose a lot, hard to predict.Example: The field with is riskier than the field with .
- more stable
- The results are close together, changing little between times.Example: The machine with is more stable than the machine with .
- means equal or approximately equal
- The condition for directly comparing the standard deviations of two samples.Example: so you can compare with .
Worked examples
Example 1
Given grouped data on the height (unit: cm) of 20 students:
Group : 2; : 5; : 8; : 4; : 1.
a) Find the representative value of each group and the mean.
b) Calculate the variance and standard deviation.
Show the solution to example 1
Step 1: The representative value is the midpoint of each group: ; ; ; ; .
Why: The midpoint of the two endpoints of the group, used in place of every value in the group.
Step 2: Sample size .
Mean: .
Why: Multiply the representative value by the frequency, then divide by the sample size, exactly the formula for the mean of grouped data.
Step 3: Compute the weighted sum of the squares of the representative values: .
Step 4: .
Why: Use the formula for brevity, squaring the representative only once.
Step 5: .
Result: cm; ; cm.
Common mistakesSubtracting instead of subtracting in the formula .
Example 2
A shop records the number of minutes customers have to wait (unit: minute) over 25 turns:
: 4; : 9; : 7; : 3; : 2.
Calculate the variance and standard deviation of this grouped data.
Show the solution to example 2
Step 1: Representative values: ; ; ; ; . Sample size .
Why: The midpoint of each group.
Step 2: .
Step 3: Sum of squares of representative values: .
Step 4: .
Why: Use the formula .
Step 5: .
Result: minutes; ; minutes.
Example 3
Two machines and both pack tea boxes, with masses (unit: gram) recorded in the table:
Machine : : 3; : 12; : 5.
Machine : : 6; : 6; : 8.
Which machine packs more consistently?
Show the solution to example 3
Step 1: Both samples have representative values ; ; and sample size .
Step 2: Machine : .
Machine : .
Why: The means are equal, so the standard deviations can be compared directly.
Step 3: Machine : , so .
Step 4: Machine : , so .
Why: The two machines have the same mean, so comparing consistency means comparing standard deviations; the machine with the smaller has box masses closer together.
Step 5: .
Result: Machine packs more consistently than machine .
Example 4
Profit (unit: million dong) of 20 investors in two fields:
Field : : 2; : 3; : 7; : 5; : 3.
Field : : 1; : 3; : 10; : 4; : 2.
Which field is riskier to invest in?
Show the solution to example 4
Step 1: Representative values: ; ; ; ; . Both samples have .
Step 2: Field : .
Step 3: , so .
Step 4: Field : .
Step 5: , so .
Why: The two fields have approximately equal mean profits, so consider the standard deviation; the field with the larger has profits that fluctuate more, that is, it is riskier.
Step 6: .
Result: Field is riskier than field .
Example 5
Two devices measuring the power (unit: watt) of a fan, each device measures 20 times:
Device 1: : 1; : 3; : 8; : 5; : 3.
Device 2: : 3; : 4; : 6; : 5; : 2.
Which device gives more consistent measurements?
Show the solution to example 5
Step 1: Representative values: ; ; ; ; . Both samples have .
Step 2: Device 1: .
Step 3: , so .
Step 4: Device 2: .
Step 5: , so .
Why: Both devices measure the same fan, so the unit is the same, watt; the two means are approximately equal ( and , differing by W), so the standard deviations can be compared directly: a smaller means the measurements are closer together.
Step 6: .
Result: Device 1 gives more consistent measurements.
Example 6
A class has 30 students, and the Math test scores (scale of 10) are grouped as follows:
: 2; : 5; : 9; : 8; : 4; : 2.
a) Calculate the mean, variance, standard deviation.
b) If one more student with a score of 9,5 is added to the group , does the standard deviation increase or decrease? Explain using its meaning.
Show the solution to example 6
Step 1: Representative values: ; ; ; ; ; . Sample size .
Step 2: .
Step 3: Weighted sum of squared representative values: .
Step 4: , so .
Step 5: Adding one student who scored points, that is, adding a value far above the mean. Since is about away from the old mean, greater than , the spread increases.
Why: The standard deviation measures how much values spread around the mean; adding one outstandingly high score stretches the distance, making the spread increase.
Step 6: Check again: , , , so .
Result: a) ; ; . b) The standard deviation increases, which fits the meaning of spread.
Terms
- Representative value
- The midpoint of the two endpoints of a grouped class, used in place of the values in that class.Example: Class has representative value .
- Mean of grouped data
- The average of the representative values weighted by frequency, denoted .Example: .
- Variance
- The frequency-weighted average of the squared distances from each class representative value to the mean, denoted .Example: .
- Standard deviation
- The principal square root of the variance, denoted , in the same unit as the data.Example: .
- Degree of spread
- How much the data values differ and spread out around the mean.Example: A large means a strong spread.
- Class frequency
- The number of data values falling in that class, denoted .Example: Class has frequency 8.
- Sample size
- The total number of data values, equal to the sum of the frequencies, denoted .Example: .
- Approximately
- The approximation obtained when the whole class is replaced by its representative value.Example: The variance computed from the grouped table is an approximation of the variance of the original sample.
- Level of risk
- How unpredictably the result fluctuates, reflected in a large standard deviation.Example: An investment with a large carries high risk.
Practise similar problems
Practice questions from the Ket noi tri thuc series on the same ideas as this lesson. Answer each one and get it marked straight away.