Skip to content
Gioi Toan
Start learning
A bar chart with three bars, the tallest one smiling

Notes on Lesson 1: Mean and mode of grouped data (Maths 11 Chan troi sang tao, Chapter V)

Lesson summary

A grouped data sample is a data sample presented as a frequency table of class intervals.

where nin_i is the frequency of class interval ii, cic_i is the representative value of class interval ii, and n=n1+...+nkn = n_1 + ... + n_k is the sample size.

A grouped data sample is like sorting students into rooms by height range, with each room recording only the number of students.

This content is not yet available in English. It is shown below in the original Vietnamese.

  • Đọc và giải thích được mẫu số liệu ghép nhóm
  • Tính được số trung bình, mốt của mẫu số liệu ghép nhóm

An insurance agency records the number of customers buying life insurance in one day by age, but instead of writing each age, they group them into intervals such as [20;30)[20;30), [30;40)[30;40), ... Then, to know the average age of customers or which age group buys the most, you need the mean and mode of the grouped data sample. This lesson helps you read and explain a grouped data sample, calculate the mean and mode from a grouped frequency table, and from there draw useful conclusions in practice.

Practise similar problems

Key ideas: what do you need to know?

Grouped data sample

  • A grouped data sample is a data sample presented as a frequency table of class intervals. Each class interval is a set of values grouped by a certain criterion, usually of the form [ui;ui+1)[u_i; u_{i+1}) with i=1,2,...,ki = 1, 2, ..., k.
  • The table has kk class intervals, each with frequency nin_i, which is the number of values in the sample belonging to that class interval. The sample size is n=n1+n2+...+nkn = n_1 + n_2 + ... + n_k.
  • The representative value of the class interval [ui;ui+1)[u_i; u_{i+1}) is the average of its two endpoints: ci=ui+ui+12c_i = \frac{u_i + u_{i+1}}{2}.
  • The class width of the class interval [ui;ui+1)[u_i; u_{i+1}) is ui+1−uiu_{i+1} - u_i.
  • When grouping, note: the number of class intervals kk is usually from 5 to 20; the class intervals have the same class width LL and the sum of the class widths is greater than the range RR; the minimum value belongs to the first class interval, the maximum value belongs to the last class interval. The endpoints may not be values of the sample.
  • Example: A statistical table of the heights (cm) of 50 students: [150;155)[150;155): 6; [155;160)[155;160): 14; [160;165)[160;165): 12; [165;170)[165;170): 8; [170;175)[170;175): 10. This is a grouped data sample with 5 class intervals and sample size n=50n = 50. The representative value of the class interval [155;160)[155;160) is 157,5157,5.

In plain words: A grouped data sample is like sorting students into rooms by height range, with each room recording only the number of students. Reading the table tells you which group is the largest and how many students there are in total. The notation [a;b)[a; b) means take aa but not bb, so each value belongs to exactly one class interval. The representative value is the number that stands in for the whole class interval in calculations, usually the average of the two endpoints. The class width tells you how many units wide each class interval is.

Phrase by phrase
Grouped data sample
A data sample presented as groups of values and the frequency of each group.Example: A height table with class intervals [150;155)[150;155), [155;160)[155;160), ...
frequency
The number of values in the sample belonging to a class interval.Example: The class interval [155;160)[155;160) has frequency 14, meaning there are 14 students from 155 cm to under 160 cm tall.
Sample size
The total number of values in the sample, equal to the sum of the frequencies.Example: The frequencies 6, 14, 12, 8, 10 give sample size n=50n = 50.
Representative value
The average of the two endpoints of the class interval, used in place of the whole class interval in calculations.Example: The class interval [160;165)[160;165) has representative value 162,5162,5.

Common mistakesWhen calculating the mean, a student takes the left endpoint of a group as the representative value instead of taking the average of the two endpoints. For example, with group [150;155)[150;155), you must use 152,5152,5, not 150150.

Mean of a grouped data sample

  • The mean of a grouped data sample, denoted x‾\overline{x}, is calculated by the formula:

x‾=n1c1+n2c2+...+nkckn,\overline{x} = \frac{n_1 c_1 + n_2 c_2 + ... + n_k c_k}{n},
where nin_i is the frequency of class interval ii, cic_i is the representative value of class interval ii, and n=n1+...+nkn = n_1 + ... + n_k is the sample size.

  • Meaning: The mean of a grouped data sample is an approximation of the mean of the original data sample. It is often used to measure the central trend of the data sample.
  • Example: With the height table above, we have:

x‾=6⋅152,5+14⋅157,5+12⋅162,5+8⋅167,5+10⋅172,550=915+2205+1950+1340+172550=813550=162,7\overline{x} = \frac{6 \cdot 152,5 + 14 \cdot 157,5 + 12 \cdot 162,5 + 8 \cdot 167,5 + 10 \cdot 172,5}{50} = \frac{915 + 2205 + 1950 + 1340 + 1725}{50} = \frac{8135}{50} = 162,7.
So the average height is approximately 162,7162,7 cm.

In plain words: Since each class interval is a range with no specific value, imagine that every value in the class interval equals the representative value (the average of the two endpoints). Then the mean of the whole sample is just the weighted average of the representative values, with the frequencies as weights. A larger class interval has more influence. This formula gives an approximation of the true mean of the original sample, but it is very convenient because you only need the frequency table.

Phrase by phrase
Mean
The value representing the average level of the whole sample, calculated by the formula above.Example: With the example above, x‾≈162,7\overline{x} \approx 162,7 cm.
an approximation of the mean of the original data sample
Since we do not have the original data, the mean calculated from the grouped table is only an approximation.Example: If we knew each height, we could calculate a more exact mean.
measure the central trend
Used to know the typical value of the data sample.Example: The average height tells you how tall the students in that class are on average.

Mode of grouped data

  • Modal class is the class with the largest frequency. Suppose that class is [um;um+1)[u_m; u_{m+1}) with frequency nmn_m. Then the mode of the grouped data, denoted MoM_o, is determined by:

Mo=um+nm−nm−1(nm−nm−1)+(nm−nm+1)⋅(um+1−um),M_o = u_m + \frac{n_m - n_{m-1}}{(n_m - n_{m-1}) + (n_m - n_{m+1})} \cdot (u_{m+1} - u_m),.
where nm−1n_{m-1} and nm+1n_{m+1} are the frequencies of the class before and the class after the modal class, respectively. If there is no preceding class then nm−1=0n_{m-1} = 0, if there is no following class then nm+1=0n_{m+1} = 0.

  • Meaning: The mode of grouped data is the value most likely to occur when sampling. The mode of grouped data is approximately the mode of the original sample. A sample may have no mode or more than one mode.
  • Example: A class's Maths test score table: [5;7)[5;7): 5; [7;9)[7;9): 18; [9;11)[9;11): 10; [11;13)[11;13): 6. The modal class is [7;9)[7;9) because it has the largest frequency, 18. We have um=7u_m = 7, nm=18n_m = 18, nm−1=5n_{m-1} = 5, nm+1=10n_{m+1} = 10, class width 9−7=29 - 7 = 2. Therefore:

Mo=7+18−5(18−5)+(18−10)⋅2=7+1321⋅2≈8,24.M_o = 7 + \frac{18 - 5}{(18 - 5) + (18 - 10)} \cdot 2 = 7 + \frac{13}{21} \cdot 2 \approx 8,24.
So the mode is approximately 8,28,2 points.

In plain words: The mode is the most common value, that is, the class with the most data. But since a class is an interval, we need a specific number within that interval. The formula pulls the mode toward whichever neighbouring class has the larger frequency: if the previous class is larger than the next one, the mode shifts left, otherwise it shifts right. The denominator is the sum of the two differences so that the added part does not exceed the class width. When calculating, remember the convention that the frequency of a class that does not exist is 0.

Phrase by phrase
Modal class
The class with the largest frequency in the table.Example: In the example above, class [7;9)[7;9) has the largest frequency, 18, so it is the modal class.
Mode
The value most likely to occur, determined from the class with the largest frequency, denoted MoM_o.Example: Mo≈8,2M_o \approx 8,2 points.
if there is no class before the modal class then nm−1=0n_{m-1} = 0
Convention: the frequency of the previous class is 0 when the modal class is the first class.Example: If the first class has the largest frequency then nm−1=0n_{m-1} = 0.
has more than one mode
When two or more classes share the largest frequency, each gives one mode.Example: If the class frequencies are 5, 8, 3, 8, 2 then there are two modal classes.

Common mistakesWhen calculating the mean, divide by the number of groups instead of dividing by the sample size nn. The formula is x‾=n1c1+...+nkckn\overline{x} = \frac{n_1 c_1 + ... + n_k c_k}{n} with n=n1+...+nkn = n_1 + ... + n_k.

Common mistakesWhen finding the modal class, only compare the frequencies of the groups to choose the largest one, but when substituting into the formula, mix up nm−1n_{m-1} and nm+1n_{m+1}. Remember that nm−1n_{m-1} is the frequency of the preceding group and nm+1n_{m+1} is the frequency of the following group.

Common mistakesForgetting the convention nm−1=0n_{m-1} = 0 when the modal class is the first group, or nm+1=0n_{m+1} = 0 when the modal class is the last group.

Common mistakesAfter calculating the mode, not checking whether the result lies in the modal class. The mode must lie in the interval [um;um+1)[u_m; u_{m+1}). If it falls outside, the formula was wrong or the numbers were substituted incorrectly.

TipThe representative value of group [a;b)[a;b) is always a+b2\frac{a+b}{2}. When calculating the mean, remember to multiply the frequency by the representative value and add them up, then finally divide by the sum of the frequencies.

TipWhen calculating the mode, check that the result lies within the range of the modal class. If not, review the substitution of nm−1n_{m-1}, nm+1n_{m+1} and the class width.

Worked examples

Example 1

A botanist measured the length of 74 leaves (unit: millimetres) and obtained the following grouped frequency table:
Class [5,45;5,85)[5,45; 5,85): 5; [5,85;6,25)[5,85; 6,25): 9; [6,25;6,65)[6,25; 6,65): 15; [6,65;7,05)[6,65; 7,05): 19; [7,05;7,45)[7,05; 7,45): 16; [7,45;7,85)[7,45; 7,85): 8; [7,85;8,25)[7,85; 8,25): 2.
a) State the classes and their corresponding frequencies. Calculate the sample size.
b) Calculate the average length of the 74 leaves (round to the hundredths place).

Show the solution to example 1

Step 1: The table has 7 classes, with frequencies 5; 9; 15; 19; 16; 8; 2. Sample size n=5+9+15+19+16+8+2=74n = 5 + 9 + 15 + 19 + 16 + 8 + 2 = 74.
Why: The sample size is the sum of the frequencies, exactly the number of leaves measured.
Step 2: Calculate the representative value of each class (the average of the two endpoints):
[5,45;5,85)[5,45; 5,85): 5,655,65; [5,85;6,25)[5,85; 6,25): 6,056,05; [6,25;6,65)[6,25; 6,65): 6,456,45; [6,65;7,05)[6,65; 7,05): 6,856,85; [7,05;7,45)[7,05; 7,45): 7,257,25; [7,45;7,85)[7,45; 7,85): 7,657,65; [7,85;8,25)[7,85; 8,25): 8,058,05.
Step 3: Calculate the numerator:
5⋅5,65=28,255 \cdot 5,65 = 28,25;
9⋅6,05=54,459 \cdot 6,05 = 54,45;
15⋅6,45=96,7515 \cdot 6,45 = 96,75;
19⋅6,85=130,1519 \cdot 6,85 = 130,15;
16⋅7,25=11616 \cdot 7,25 = 116;
8⋅7,65=61,28 \cdot 7,65 = 61,2;
2⋅8,05=16,12 \cdot 8,05 = 16,1.
Sum: 28,25+54,45+96,75+130,15+116+61,2+16,1=502,928,25 + 54,45 + 96,75 + 130,15 + 116 + 61,2 + 16,1 = 502,9.
Step 4: x‾=502,974≈6,796\overline{x} = \frac{502,9}{74} \approx 6,796. Round to the hundredths place: 6,806,80.
Result: The average length is approximately 6,806,80 mm.

Example 2

The weights (kg) of 42 students in class 11D are grouped as follows:
[40;45)[40;45): 10; [45;50)[45;50): 7; [50;55)[50;55): 16; [55;60)[55;60): 4; [60;65)[60;65): 2; [65;70)[65;70): 3.
Calculate the average weight of the students in class 11D (round to the hundredths place).

Show the solution to example 2

Step 1: Sample size n=10+7+16+4+2+3=42n = 10 + 7 + 16 + 4 + 2 + 3 = 42.
Step 2: Representative values of the classes: 42,542,5; 47,547,5; 52,552,5; 57,557,5; 62,562,5; 67,567,5.
Step 3: Numerator:
10⋅42,5=42510 \cdot 42,5 = 425;
7⋅47,5=332,57 \cdot 47,5 = 332,5;
16⋅52,5=84016 \cdot 52,5 = 840;
4⋅57,5=2304 \cdot 57,5 = 230;
2⋅62,5=1252 \cdot 62,5 = 125;
3⋅67,5=202,53 \cdot 67,5 = 202,5.
Sum: 425+332,5+840+230+125+202,5=2155425 + 332,5 + 840 + 230 + 125 + 202,5 = 2155.
Step 4: x‾=215542≈51,3095\overline{x} = \frac{2155}{42} \approx 51,3095. Round to the hundredths place: 51,3151,31.
Result: The average weight is approximately 51,3151,31 kg.

Example 3

The Maths test results of class 11D are put into a grouped frequency table:
[5;7)[5;7): 5; [7;9)[7;9): 18; [9;11)[9;11): 10; [11;13)[11;13): 6.
Calculate the mode of the grouped data (round to the tenths place).

Show the solution to example 3

Step 1: The largest frequency is 18, which belongs to class [7;9)[7;9). So the modal class is [7;9)[7;9).
Step 2: Determine the values: um=7u_m = 7; nm=18n_m = 18; nm−1=5n_{m-1} = 5; nm+1=10n_{m+1} = 10; class width um+1−um=9−7=2u_{m+1} - u_m = 9 - 7 = 2.
Step 3: Apply the formula:
Mo=7+18−5(18−5)+(18−10)⋅2=7+1313+8⋅2=7+1321⋅2=7+2621≈7+1,238=8,238.M_o = 7 + \frac{18 - 5}{(18 - 5) + (18 - 10)} \cdot 2 = 7 + \frac{13}{13 + 8} \cdot 2 = 7 + \frac{13}{21} \cdot 2 = 7 + \frac{26}{21} \approx 7 + 1,238 = 8,238.
Round to the tenths place: 8,28,2.
Why: The following class has frequency 10, greater than the previous class's 5, so the mode is pulled to the right, that is, greater than 8 (the midpoint of the class).
Result: Mo≈8,2M_o \approx 8,2 points.

TipThe mode always lies in the class interval with the largest frequency. If the following adjacent class interval has a greater frequency than the preceding adjacent class interval, then the mode is greater than the midpoint of the class interval; otherwise, the mode is less than the midpoint of the class interval.

Example 4

The heights (cm) of 50 students in class 11A are grouped:
[150;155)[150;155): 6; [155;160)[155;160): 14; [160;165)[160;165): 12; [165;170)[165;170): 8; [170;175)[170;175): 10.
a) Calculate the mode of the grouped data.
b) Calculate the average height.
c) From the results, what can be concluded about the heights of the students in class 11A?

Show the solution to example 4

Step 1: a) The largest frequency is 14, which belongs to group [155;160)[155;160). So the modal class is [155;160)[155;160).
Step 2: um=155u_m = 155; nm=14n_m = 14; nm−1=6n_{m-1} = 6; nm+1=12n_{m+1} = 12; class width 160−155=5160 - 155 = 5.
Step 3: Mo=155+14−6(14−6)+(14−12)⋅5=155+88+2⋅5=155+810⋅5=155+4=159M_o = 155 + \frac{14 - 6}{(14 - 6) + (14 - 12)} \cdot 5 = 155 + \frac{8}{8 + 2} \cdot 5 = 155 + \frac{8}{10} \cdot 5 = 155 + 4 = 159.
Step 4: b) Sample size n=6+14+12+8+10=50n = 6 + 14 + 12 + 8 + 10 = 50. Representative values: 152,5152,5; 157,5157,5; 162,5162,5; 167,5167,5; 172,5172,5.
Numerator: 6⋅152,5=9156 \cdot 152,5 = 915; 14⋅157,5=220514 \cdot 157,5 = 2205; 12⋅162,5=195012 \cdot 162,5 = 1950; 8⋅167,5=13408 \cdot 167,5 = 1340; 10⋅172,5=172510 \cdot 172,5 = 1725. Sum: 915+2205+1950+1340+1725=8135915 + 2205 + 1950 + 1340 + 1725 = 8135.
x‾=813550=162,7\overline{x} = \frac{8135}{50} = 162,7.
Step 5: c) The mode 159159 cm shows that the most common height is around 159159 cm; the mean 162,7162,7 cm shows the general level. So the class has many students around 159159 cm tall but still has a group taller than 170170 cm, so heights are quite spread out.
Results: a) Mo=159M_o = 159 cm; b) x‾=162,7\overline{x} = 162,7 cm; c) the most common height is about 159159 cm, the mean is about 162,7162,7 cm.

Example 5

An insurance agency records the number of female customers buying life insurance in one day by age group:
[20;30)[20;30): 8; [30;40)[30;40): 12; [40;50)[40;50): 20; [50;60)[50;60): 15; [60;70)[60;70): 5.
a) Calculate the average age of the female customers.
b) Find the age group with the most female customers and calculate the mode.
c) If the agency wants to focus advertising on the largest group of female customers, which age group should it choose?

Show the solution to example 5

Step 1: a) Sample size n=8+12+20+15+5=60n = 8 + 12 + 20 + 15 + 5 = 60. Representative values: 2525; 3535; 4545; 5555; 6565.
Numerator: 8⋅25=2008 \cdot 25 = 200; 12⋅35=42012 \cdot 35 = 420; 20⋅45=90020 \cdot 45 = 900; 15⋅55=82515 \cdot 55 = 825; 5⋅65=3255 \cdot 65 = 325. Sum: 200+420+900+825+325=2670200 + 420 + 900 + 825 + 325 = 2670.
x‾=267060=44,5\overline{x} = \frac{2670}{60} = 44,5.
Step 2: b) The group with the largest frequency is [40;50)[40;50) with 20 customers. This is the modal class.
um=40u_m = 40; nm=20n_m = 20; nm−1=12n_{m-1} = 12; nm+1=15n_{m+1} = 15; class width 1010.
Mo=40+20−12(20−12)+(20−15)⋅10=40+88+5⋅10=40+8013≈40+6,15=46,15M_o = 40 + \frac{20 - 12}{(20 - 12) + (20 - 15)} \cdot 10 = 40 + \frac{8}{8 + 5} \cdot 10 = 40 + \frac{80}{13} \approx 40 + 6,15 = 46,15.
Step 3: c) Group [40;50)[40;50) has the most customers (20 people), the mode is about 46,1546,15 years old. So advertising should focus on the age group from 40 to under 50.
Results: a) x‾=44,5\overline{x} = 44,5 years old; b) group [40;50)[40;50), Mo≈46,15M_o \approx 46,15 years old; c) choose group [40;50)[40;50).

Example 6

The number of products each worker in a team makes in one day is grouped:
[10;20)[10;20): 3; [20;30)[20;30): 5; [30;40)[30;40): 6; [40;50)[40;50): 5; [50;60)[50;60): 1.
a) Calculate the average number of products each worker makes in one day.
b) Find the mode of the grouped data.
c) If the team has 20 workers and wants to set a quota based on the average number of products, about how many products per day per worker should it set?

Show the solution to example 6

Step 1: a) Sample size n=3+5+6+5+1=20n = 3 + 5 + 6 + 5 + 1 = 20. Representative values: 1515; 2525; 3535; 4545; 5555.
Numerator: 3⋅15=453 \cdot 15 = 45; 5⋅25=1255 \cdot 25 = 125; 6⋅35=2106 \cdot 35 = 210; 5⋅45=2255 \cdot 45 = 225; 1⋅55=551 \cdot 55 = 55. Sum: 45+125+210+225+55=66045 + 125 + 210 + 225 + 55 = 660.
x‾=66020=33\overline{x} = \frac{660}{20} = 33.
Step 2: b) The group with the largest frequency is [30;40)[30;40) with 6 workers. This is the modal class.
um=30u_m = 30; nm=6n_m = 6; nm−1=5n_{m-1} = 5; nm+1=5n_{m+1} = 5; class width 1010.
Mo=30+6−5(6−5)+(6−5)⋅10=30+12⋅10=35M_o = 30 + \frac{6 - 5}{(6 - 5) + (6 - 5)} \cdot 10 = 30 + \frac{1}{2} \cdot 10 = 35.
Step 3: c) The average number of products is 33, the mode is 35. The quota should be set at about 33 products per day per worker, because that is the average, while the mode of 35 shows that many workers make around 35.
Results: a) x‾=33\overline{x} = 33 products; b) Mo=35M_o = 35 products; c) set a quota of about 33 products per day.

Terms

Grouped data sample
The data sample is presented as a frequency table of class intervals.Example: A height table with class intervals [150;155)[150;155), [155;160)[155;160), ...
Class interval
A set of values grouped by a criterion, usually of the form [a;b)[a; b).Example: The [20;30)[20;30) age class interval.
Frequency
The number of values in the sample belonging to a class interval.Example: The class interval [155;160)[155;160) has frequency 14.
Sample size
The total number of values in the sample, equal to the sum of the frequencies.Example: The frequencies 6, 14, 12, 8, 10 give sample size n=50n = 50.
Representative value
The average of the two endpoints of the class interval, used in place of the whole class interval in calculations.Example: The class interval [160;165)[160;165) has representative value 162,5162,5.
Class width
The difference between the right endpoint and the left endpoint of the class interval.Example: The class interval [150;155)[150;155) has class width 5.
Mean
The representative value for the average level of the whole sample, denoted x‾\overline{x}.Example: x‾≈162,7\overline{x} \approx 162,7 cm.
Mode
The value corresponding to the class interval with the largest frequency, denoted MoM_o.Example: Mo≈8,2M_o \approx 8,2 points.