Grouped frequency and relative frequency tables and charts
🖨 Print a self-study sheet Why print?
Suppose the PE teacher has just measured the heights (in cm) of the 20 students in the athletics team and written them down:
A frequency table as in the previous lessons would have 15 different values, most appearing only once. Such a long table shows us nothing. Yet to choose shirt sizes, the teacher only needs to know "how many students are from 155 cm up to 160 cm". How can a table be short and still say what we need?
Grouping data
Explore: counting in 5 cm steps
Let us try another way: we split the heights into intervals 5 cm wide and count how many students fall in each:
| Height (cm) | |||||
|---|---|---|---|---|---|
| Number of students |
The notation means the numbers with . So a student 155 cm tall belongs to this class, while one 160 cm tall belongs to the next. Now the table tells us what we need: the class is the largest, with students.
Going deeper. Grouping is "looking from a distance": we drop some detail (we no longer know who is 151 or 153 cm tall) to see the overall picture. Classes usually have equal widths and follow on from each other. The half-open form [a, b) makes sure a value on a boundary is counted only once. Too few classes lose a lot of information, and too many are as messy as the original table; 5 to 8 classes is usual.
Charts for grouped data
Histograms
In a histogram (grouped frequency bar chart), each bar stands on a whole class [a, b) on the horizontal axis. So the bars touch each other: the data run continuously, with no "gap" between 149.9 cm and 150 cm.
A relative frequency histogram is drawn in exactly the same way; only the bar heights change, and they equal the relative frequencies.
Frequency polygons
To draw a relative frequency polygon for grouped data, each class gives us one point: its x-coordinate is the class midpoint and its y-coordinate is the relative frequency. Then we join consecutive points. For class 9A the midpoints are 147.5, 152.5, …, 172.5.
Looking at the broken line, we see that heights cluster around the class [155, 160) and thin out on both sides.
Connections. Grouping continues frequency tables and relative frequency: it is the same idea of counting, with "value" replaced by "class". In years 11 and 12, we use grouped tables and class midpoints to estimate the mean, the median and the standard deviation.
Key terms
Summary
- Class [a, b): a\leq x<b; width b-a; midpoint \dfrac{a+b}{2}.
- Relative frequency of a class: f_i=\dfrac{m_i}{n}\cdot100\%.
- Histogram: the bars touch. Frequency polygon: join the points (midpoint, f_i).
- Grouping loses the information inside each class. Back to the opening question: a grouped table tells the teacher at once how many students are in each height range, enough to choose shirt sizes, and the price is the detail lost inside each class. One thing to remember: classes are written as half-open intervals, and the bars must touch.
Practice
Each exercise comes with what you need to remember and some hints. Try it yourself first, and open the solution only when you are stuck. After a few exercises it will feel much more familiar.
Suppose the daily private study times (in minutes) of 20 students are:
54,\ 76,\ 73,\ 68,\ 98,\ 43,\ 73,\ 32,\ 44,\ 51,\ 38,\ 72,\ 55,\ 44,\ 97,\ 33,\ 46,\ 41,\ 69,\ 91.
Build the grouped frequency and relative frequency table with classes [20, 40), [40, 60), [60, 80), [80, 100).
What you need: x belongs to the class [a, b) when a\leq x<b; f_i=\dfrac{m_i}{n}\cdot100\%.
Steps:
- Count the data values in each class and check that the total is 20.
- Divide each frequency by 20.
Show solution
Counting by class, we get the frequencies 3, 8, 6, 3 (total 20).
So the corresponding relative frequencies are \dfrac{3}{20}=15\%, \dfrac{8}{20}=40\%, \dfrac{6}{20}=30\%, \dfrac{3}{20}=15\%.
Answer. Frequencies 3, 8, 6, 3; relative frequencies 15\%, 40\%, 30\%, 15\%.
Consider the classes [0, 5), [5, 10), [10, 15), [15, 20).
a) Which class does the value 10 belong to? Find the class midpoints.
b) Lan uses the classes [0, 5], [5, 10], [10, 15], [15, 20]. What is wrong with this?
What you need: [a, b) contains a\leq x<b; midpoint \dfrac{a+b}{2}.
Steps:
- Check which class's inequality 10 satisfies.
- Look at the value 5 in Lan's classes.
Show solution
a) The class [a, b) contains the values x with a\le x<b. Since 10\le10<15, the value 10 belongs to the class [10, 15) (it does not belong to [5, 10), which does not contain its right end point).
The midpoint of the class [a, b) is \dfrac{a+b}{2}. Hence the class midpoints are \frac{0+5}{2}=2.5;\quad \frac{5+10}{2}=7.5;\quad \frac{10+15}{2}=12.5;\quad \frac{15+20}{2}=17.5.
So the value 10 belongs to the class [10, 15); the class midpoints are 2.5; 7.5; 12.5; 17.5.
b) With Lan's classes, the value 5 belongs to both [0, 5] and [5, 10]; in the same way, 10 and 15 each belong to two classes. When counting, these values are counted twice.
So Lan's classes are wrong because they overlap; the classes must not overlap, for example by using the form [a, b).
Answer. a) [10, 15); 2.5; 7.5; 12.5; 17.5. b) The classes overlap.
Suppose the daily household waste (in kg) of 50 households has the grouped frequency table: [0, 2): 8 households, [2, 4): 19, [4, 6): 15, [6, 8): 8.
a) Build the grouped relative frequency table.
b) What percentage of households throw away 4 kg of waste or more per day?
What you need: f_i=\dfrac{m_i}{n}\cdot100\%.
Steps:
- Divide each frequency by 50.
- Add the relative frequencies of the last two classes.
Show solution
a) The relative frequency of each class is its frequency divided by the number of households (n=50): \frac{8}{50}=16\%;\quad \frac{19}{50}=38\%;\quad \frac{15}{50}=30\%;\quad \frac{8}{50}=16\%.
The grouped relative frequency table is:
| Waste (kg) | [0, 2) | [2, 4) | [4, 6) | [6, 8) |
|---|---|---|---|---|
| Relative frequency | 16\% | 38\% | 30\% | 16\% |
Check: 16\%+38\%+30\%+16\%=100\%.
b) The households that throw away 4 kg or more per day are in the two classes [4, 6) and [6, 8). Their percentage is 30\%+16\%=46\%.
So 46\% of the households throw away 4 kg of waste or more per day.
Answer. a) 16\%, 38\%, 30\%, 16\%; b) 46\%.
Suppose that on a road with a 50 km/h limit, a camera records the speeds (in km/h) of 80 motorbikes: [30, 40): 10 motorbikes, [40, 50): 38, [50, 60): 24, [60, 70): 8.
a) What percentage of the motorbikes travel at 50 km/h or more?
b) Can we find the number of motorbikes travelling faster than 55 km/h? Why?
What you need: a grouped table does not show the data inside a class.
Steps:
- Add the frequencies of the last two classes and divide by 80.
- Is 55 a class boundary?
Show solution
a) The motorbikes travelling at 50 km/h or more are in the two classes [50, 60) and [60, 70). There are 24+8=32 of them.
Their percentage is \frac{32}{80}\cdot100\%=40\%.
So 40\% of the motorbikes travel at 50 km/h or more.
b) The value 55 lies inside the class [50, 60). The grouped frequency table only tells us that 24 motorbikes have speeds from 50 km/h up to (but not including) 60 km/h; it does not give the individual speeds of these 24 motorbikes.
So we cannot find exactly how many motorbikes travel faster than 55 km/h.
Answer. a) 40\%; b) no.
(1.5 marks) Suppose the 100 m times (in seconds) of 40 students have the grouped frequency table: [13, 14): 4, [14, 15): 9, [15, 16): x, [16, 17): 10, [17, 18): 5.
a) Find x.
b) Build the grouped relative frequency table.
c) What percentage of the students run 100 m in under 15 seconds?
What you need: the frequencies add up to n; f_i=\dfrac{m_i}{n}\cdot100\%.
Steps:
- x=40-(4+9+10+5).
- Divide each frequency by 40.
- Add the relative frequencies of the first two classes.
Show solution
a) The frequencies add up to the number of students, so 4+9+x+10+5=40.
It follows that x+28=40, so x=12.
So x=12.
b) The relative frequency of each class is its frequency divided by 40: \frac{4}{40}=10\%;\quad \frac{9}{40}=22.5\%;\quad \frac{12}{40}=30\%;\quad \frac{10}{40}=25\%;\quad \frac{5}{40}=12.5\%.
The grouped relative frequency table is:
| Time (s) | [13, 14) | [14, 15) | [15, 16) | [16, 17) | [17, 18) |
|---|---|---|---|---|---|
| Relative frequency | 10\% | 22.5\% | 30\% | 25\% | 12.5\% |
c) The students who run in under 15 seconds are in the two classes [13, 14) and [14, 15). Their percentage is 10\%+22.5\%=32.5\%.
So 32.5\% of the students run 100 m in under 15 seconds.
Answer. a) 12; b) 10\%, 22.5\%, 30\%, 25\%, 12.5\%; c) 32.5\%.
Suppose class 9B has 25 students with heights (cm): [145, 150): 1, [150, 155): 5, [155, 160): 9, [160, 165): 6, [165, 170): 3, [170, 175): 1. Compare the percentage of students 160 cm tall or more in class 9B with that of class 9A in the example (45\%).
What you need: classes of different sizes are compared using relative frequencies.
Steps:
- Add the frequencies of the last three classes of 9B.
- Divide by 25 and compare with 45\%.
Show solution
Class 9B has 6+3+1=10 students 160 cm tall or more, which is \dfrac{10}{25}\cdot100\%=40\%.
So this percentage is lower in class 9B (40\%) than in class 9A (45\%).
Answer. 40\%<45\%.
Suppose the grouped frequency table of a data set of size 50 has five classes with frequencies 6, x, 15, y, 4. The relative frequency of the second class is 10\% more than that of the fourth class. Find x and y. (Revise solving simultaneous equations.)
What you need: the frequencies add up to the sample size; f_i=\dfrac{m_i}{n}\cdot100\%.
Steps:
- Form the equation x+y=25.
- From \dfrac{x-y}{50}=10\%, deduce x-y=5.
Show solution
From the question, 6+x+15+y+4=50, so x+y=25; and \dfrac{x}{50}-\dfrac{y}{50}=0.1, so x-y=5.
Adding the two equations, we get 2x=30, so x=15 and y=10 (these satisfy the conditions).
So x=15, y=10.
Answer. x=15, y=10.
The relative frequency polygon of a grouped data set of size 60 passes through the points (15, 10), (25, 40), (35, 35), (45, 15) (y-coordinates in %). The classes have equal widths. Find the classes, the frequency of each class and the number of data values in [20, 40).
What you need: consecutive midpoints are exactly one class width apart; m_i=f_i\cdot n.
Steps:
- The class width is 25-15; deduce the boundaries.
- Multiply each relative frequency by 60.
Show solution
The class width is 25-15=10, and the class with midpoint 15 is [10, 20). Hence the classes are [10, 20), [20, 30), [30, 40), [40, 50), with frequencies 60\cdot10\%=6, 60\cdot40\%=24, 60\cdot35\%=21, 60\cdot15\%=9.
So 24+21=45 data values lie in [20, 40) (the two middle classes).
Answer. Frequencies 6, 24, 21, 9; 45 data values.
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
We have 155\leq155<160. The class [150, 155) does not contain its upper boundary 155 (A is wrong), so 155 belongs to exactly one class (B and C are wrong).
\dfrac{40+50}{2}=45. A is the class width, B is the lower boundary, D is the upper boundary.
\dfrac{12}{30}\cdot100\%=40\%. B uses the frequency as a percentage, C is the remaining part, D works out 30\div12.
The data run continuously across the classes, so the bars touch. A describes a bar chart of ungrouped data; the width of a bar is the class width (C is wrong) and its height is the frequency (D is wrong).
Part II. True or false
| a) Each class has a width of 5 minutes. | ||
| b) The relative frequency of the class [5, 10) is 40\%. | ||
| c) 18 customers wait 10 minutes or more. | ||
| d) From the table, we know that exactly 6 customers wait less than 2 minutes. |
a) True. b) True: \dfrac{20}{50}=40\%. c) True: 10+8=18. d) False: the table does not show the data inside the class [0, 5).
Part III. Short answer
\dfrac{18}{50}=36\%.
\dfrac{12.5+17.5}{2}=15.
Show answers and explanations
- Part I, question 1: D. We have 155\leq155<160. The class [150, 155) does not contain its upper boundary 155 (A is wrong), so 155 belongs to exactly one class (B and C are wrong).
- Part I, question 2: C. \dfrac{40+50}{2}=45. A is the class width, B is the lower boundary, D is the upper boundary.
- Part I, question 3: A. \dfrac{12}{30}\cdot100\%=40\%. B uses the frequency as a percentage, C is the remaining part, D works out 30\div12.
- Part I, question 4: B. The data run continuously across the classes, so the bars touch. A describes a bar chart of ungrouped data; the width of a bar is the class width (C is wrong) and its height is the frequency (D is wrong).
- Part II, question 1: a) True; b) True; c) True; d) False. a) True. b) True: \dfrac{20}{50}=40\%. c) True: 10+8=18. d) False: the table does not show the data inside the class [0, 5).
- Part III, question 1: 36. \dfrac{18}{50}=36\%.
- Part III, question 2: 15. \dfrac{12.5+17.5}{2}=15.