Mathematics · Book 1 · Grades 1–9

Primary & Middle School Mathematics

Primary & Middle School Mathematics · Grades 1–9

50Organizing Data

Before computing anything, data must be collected, counted and displayed. This chapter is about turning a messy list of observations into a clear table or picture: counts, frequencies, grouped data, bar charts and pie charts. Summarizing data by a single number (mean, median) is the subject of Chapter 71.

50.1 Counts and frequencies

Definition 50.1 (Count and frequency)

For each possible value of a survey, its count is the number of times it appears; its frequency is the count divided by the total number of observations:

frequency=counttotal.\text{frequency} = \frac{\text{count}}{\text{total}} .

Frequencies can be written as fractions, decimals or percentages, and they always add up to 11 (i.e. 100%100\,\%).

Example 50.2

Favorite sport of the 2525 students of a class, from the raw list to the table:

sportfootballswimmingtennisjudototal
count10106655442525
frequency0.400.400.240.240.200.200.160.1611

For football: 1025=40100=0.40=40%\frac{10}{25} = \frac{40}{100} = 0.40 = 40\,\%. The frequency row must sum to 11 — a permanent, free check.

Remark 50.3 (Why frequencies?)

Counts cannot be compared across groups of different sizes: 1010 football fans in a class of 2525 (that is 40%40\,\%) show more enthusiasm than 1212 in a school year of 120120 (10%10\,\%). Frequencies put everything on the same scale.

50.2 Grouping data in classes

Example 50.4 (Classes)

The heights (in cm) of 2020 students range from 148148 to 172172. Listing every height separately would give a table with almost as many columns as students; instead, group into classes:

height (cm)[145,155)\intco{145}{155}[155,165)\intco{155}{165}[165,175)\intco{165}{175}total
count5599662020
frequency0.250.250.450.450.300.3011

Each height is counted in exactly one class (155155 goes in [155,165)\intco{155}{165}, not in both — that is why the intervals are half-open). Grouping loses detail but gains readability.

50.3 Charts

Method 50.5 (Choosing and drawing a chart)

  1. Bar chart: one bar per value or class, height proportional to the count (or the frequency). Good for comparing values.
  2. Pie chart: one sector per value, angle proportional to the frequency — the full circle (360360^\circ) represents the total, so

    angle=frequency×360.\text{angle} = \text{frequency} \times 360^\circ .

    Good for showing shares of a whole.

  3. In both cases: title, labels, and a graduation or the percentages written on the chart.

Example 50.6

Angles for the sports of Example 50.2: football 0.40×360=1440.40 \times 360 = 144^\circ; swimming 0.24×360=86.40.24 \times 360 = 86.4^\circ; tennis 7272^\circ; judo 57.657.6^\circ. Check: 144+86.4+72+57.6=360144 + 86.4 + 72 + 57.6 = 360.

The same data as a bar chart (compare heights) and as a pie chart (compare shares of the class). Football takes 144, i.e. 40\,\% of the circle. The same data as a bar chart (compare heights) and as a pie chart (compare shares of the class). Football takes 144, i.e. 40\,\% of the circle.
The same data as a bar chart (compare heights) and as a pie chart (compare shares of the class). Football takes 144144^\circ, i.e. 40%40\,\% of the circle.

Example 50.7 (Reading critically)

A chart whose vertical axis starts at 99 instead of 00 makes a bar of 1010 look ten times taller than a bar of 9.19.1 — visually misleading, although the numbers are honest. First reflex in front of any chart: check where the axis starts and what one graduation is worth (Method 44.8).

50.4 Exercises

Exercise 50.1

Here are the marks of 2020 students: 1212, 1515, 99, 1212, 1414, 99, 1212, 1515, 1111, 1212, 99, 1414, 1212, 1111, 1515, 99, 1212, 1414, 1111, 1212. Build the table of counts (one column per mark).

Solution

Solution of Exercise 50.1.

Counting each mark:

mark991111121214141515total
count44337733332020

Exercise 50.2

Complete the table of Exercise 50.1 with a frequency row (as fractions of 2020, then as percentages). Check the sum.

Solution

Solution of Exercise 50.2.

Frequencies: 420=20%\frac{4}{20} = 20\,\%, 320=15%\frac{3}{20} = 15\,\%, 720=35%\frac{7}{20} = 35\,\%, 15%15\,\%, 15%15\,\%. Sum: 20+15+35+15+15=100%20 + 15 + 35 + 15 + 15 = 100\,\%. ✓

Exercise 50.3

In a survey of 5050 families, 3030 have one car. What is the frequency of “one car”, as a decimal and as a percentage? In another survey, 4545 families out of 9090 have one car: which survey shows the higher proportion?

Solution

Solution of Exercise 50.3.

First survey: 3050=0.6=60%\frac{30}{50} = 0.6 = 60\,\%. Second: 4590=0.5=50%\frac{45}{90} = 0.5 = 50\,\%. The first survey shows the higher proportion, although it has fewer families with one car in absolute count.

Exercise 50.4

The masses (kg) of 1515 dogs: 88, 2323, 3131, 1212, 99, 2727, 3535, 1414, 2222, 1818, 2929, 1111, 2525, 3333, 1616. Group them into the classes [5,15)\intco{5}{15}, [15,25)\intco{15}{25}, [25,35)\intco{25}{35}, [35,45)\intco{35}{45} and give the counts.

Solution

Solution of Exercise 50.4.

[5,15)\intco{5}{15}: 8,12,9,14,118, 12, 9, 14, 11 — count 55. [15,25)\intco{15}{25}: 23,22,18,1623, 22, 18, 16 — count 44. [25,35)\intco{25}{35}: 31,27,29,25,3331, 27, 29, 25, 33 — count 55. [35,45)\intco{35}{45}: 3535 — count 11. Total 1515. ✓

Exercise 50.5

Draw the bar chart of the table:

pets00112233
families8812126644
Solution

Solution of Exercise 50.5.

Four bars of heights 88, 1212, 66, 44 over the values 00, 11, 22, 33 (graduation every 22 works well).

Exercise 50.6

For the table of Exercise 50.5, compute the frequencies and the pie-chart angles of each value (check: total 360360^\circ).

Solution

Solution of Exercise 50.6.

Total 3030 families. Frequencies: 830\frac{8}{30}, 1230\frac{12}{30}, 630\frac{6}{30}, 430\frac{4}{30}. Angles (×360\times 360^\circ): 9696^\circ, 144144^\circ, 7272^\circ, 4848^\circ; sum 96+144+72+48=36096 + 144 + 72 + 48 = 360^\circ. ✓

Exercise 50.7

A pie chart about favorite seasons shows: summer 162162^\circ, spring 9090^\circ, autumn 5454^\circ, winter 5454^\circ. What percentage chose each season? If 6060 people answered, how many chose summer?

Solution

Solution of Exercise 50.7.

Percentages: summer 162360=45%\frac{162}{360} = 45\,\%; spring 90360=25%\frac{90}{360} = 25\,\%; autumn and winter 54360=15%\frac{54}{360} = 15\,\% each. Out of 6060 people, summer was chosen by 0.45×60=270.45 \times 60 = 27 of them.

Exercise 50.8 ★★

In class A, 1212 students out of 3030 walk to school; in class B, 1414 out of 4040. Which class has the higher proportion of walkers? Justify with frequencies, not counts.

Solution

Solution of Exercise 50.8.

Class A: 1230=40%\frac{12}{30} = 40\,\%. Class B: 1440=35%\frac{14}{40} = 35\,\%. Class A has the higher proportion of walkers, even though class B has more walkers in count.

Exercise 50.9 ★★

A magazine prints a bar chart of monthly sales: 98009\,800, then 1000010\,000, then 1010010\,100, with the vertical axis starting at 97009\,700. Describe what the reader sees, and what an honest axis starting at 00 would show instead.

Solution

Solution of Exercise 50.9.

With the axis starting at 97009\,700, the three bars have visible heights 100100, 300300 and 400400 units: the last looks four times the first, suggesting sales quadrupled. With an axis from 00, the bars are nearly equal (98009\,800 to 1010010\,100 is a rise of about 3%3\,\%): the honest picture shows almost flat sales.

Exercise 50.10 ★★

A frequency table has three values with frequencies 0.350.35, 0.40.4 and ff. Find ff. If the total count is 8080, give the three counts.

Solution

Solution of Exercise 50.10.

Frequencies sum to 11: f=10.350.4=0.25f = 1 - 0.35 - 0.4 = 0.25. Counts (total 8080): 0.35×80=280.35 \times 80 = 28; 0.4×80=320.4 \times 80 = 32; 0.25×80=200.25 \times 80 = 20. Check: 28+32+20=8028 + 32 + 20 = 80.

Exercise 50.11 ★★★

In a school, 55%55\,\% of the students are girls. Among the girls, 40%40\,\% eat at the cafeteria; among the boys, 60%60\,\% do. Out of 400400 students, how many eat at the cafeteria? (Compute the four group sizes step by step.) What overall percentage is that?

Solution

Solution of Exercise 50.11.

Girls: 55%55\,\% of 400=220400 = 220; boys: 180180. Cafeteria-going girls: 0.4×220=880.4 \times 220 = 88; boys: 0.6×180=1080.6 \times 180 = 108. Total: 88+108=19688 + 108 = 196 students, i.e. 196400=49%\frac{196}{400} = 49\,\% of the school — between 40%40\,\% and 60%60\,\%, closer to the girls’ rate because girls are more numerous.

50.5 Problem: How data lies — and how to catch it

Problem 50.1

Weekend problem — counts against frequencies, the poll that fooled a country, and the paradox of the two hospitals

Numbers do not lie, but they can be made to mislead: a huge count can hide a small frequency, a gigantic survey can be worthless, and — strangest of all — a hospital can beat its rival on every category of patients and still lose on the overall figures. All three traps are sprung in this problem, armed only with the counts and frequencies of this chapter (Definition 50.1).

Part I — Counts are not frequencies.

  1. School A recycles 120120 of its 400400 juice cartons; school B, 9090 of its 250250. Which school has the larger count of recycled cartons? The larger frequency? Which school deserves the recycling prize?
  2. A new timetable is surveyed: 1818 of the 3030 teachers like it, and 210210 of the 600600 students do. Compute the two frequencies, then the frequency among all 630630 people together. Why does the combined figure sit so close to the students’ one?
  3. A published pie chart shows sectors labelled 45%45\,\%, 30%30\,\%, 20%20\,\% and 10%10\,\%. Without any further information, how do you know a mistake was made?
  4. A frequency table over 4040 observations is half-erased: counts 1414, 1010, ??, ?? and frequencies 0.350.35, 0.250.25, 0.150.15, ??. Rebuild the missing entries.
  5. A survey ends with frequencies 0.400.40, 0.350.35 and 0.250.25. Compute the three pie-chart angles (Method 50.5) and check they close the circle.

Part II — The poll that fooled a country. In 1936, an American magazine mailed ten million ballots to addresses taken from telephone directories and car registration lists, received 2.42.4 million answers, and predicted a crushing victory for candidate Landon. A young statistician, George Gallup, questioned only about fifty thousand people — chosen to resemble the whole population — and predicted the opposite. Roosevelt won by a landslide.

  1. What frequency of the mailed ballots came back?
  2. In 1936 telephones and cars were luxuries. Explain in one or two sentences why the magazine’s sample, though enormous, was doomed — and which lesson of question 1 it repeats at national scale.
  3. A toy model. A town has 10001\,000 wealthy voters, of whom 70%70\,\% support L, and 90009\,000 modest voters, of whom 30%30\,\% support L. Compute L’s true support in the town. A “telephone-book poll” reaches 500500 wealthy and 500500 modest voters: what support does it predict?
  4. The silent trap: a company has 200200 unhappy customers and 800800 happy ones. It surveys everyone; 40%40\,\% of the unhappy reply, but only 10%10\,\% of the happy do. Compute the number of replies of each kind, and the frequency of unhappiness among the replies. Compare with the true frequency.
  5. Repair the poll of question 8: keep 10001\,000 interviews, but distribute them in the town’s true proportions. What does the repaired poll predict?

Part III — The paradox of the two hospitals. Two hospitals publish their cure counts, split by severity:

mild casessevere cases
hospital A9090 cured of 100100280280 cured of 400400
hospital B340340 cured of 4004006565 cured of 100100
  1. Compute hospital A’s cure frequency for mild cases, for severe cases, and overall (all 500500 patients).
  2. Same three computations for hospital B. Which hospital wins on mild cases? On severe cases?
  3. Compare the two overall frequencies. State plainly the strange thing that has happened.
  4. Explain the trick: compare the two hospitals’ mixes of patients, and say why the overall frequency can betray both category frequencies. If you had a severe case, which hospital should you choose?
  5. A newspaper headline reads: “Hospital B has the better cure rate: 81%81\,\% against 74%74\,\%.” Write the two-sentence letter to the editor that this whole problem has taught you to write — one sentence on what the headline ignores, one on the general moral (compare like with like, and mind the weights).
Solution

Solution of Problem 50.1.

1. Counts: 120>90120 > 90, school A wins. Frequencies: 120400=0.30=30%\frac{120}{400} = 0.30 = 30\,\% against 90250=0.36=36%\frac{90}{250} = 0.36 = 36\,\%: school B wins. The prize should follow the frequency — school B recycles a larger share of what it uses; school A merely drinks more juice.

2. Teachers: 1830=0.60=60%\frac{18}{30} = 0.60 = 60\,\%. Students: 210600=0.35=35%\frac{210}{600} = 0.35 = 35\,\%. Together: 18+210630=2286300.36=36%\frac{18 + 210}{630} = \frac{228}{630} \approx 0.36 = 36\,\%. The students are twenty times more numerous, so the combined frequency is pulled almost entirely to their side — the big group carries the big weight.

3. Frequencies must add up to 100%100\,\% (Definition 50.1), but 45+30+20+10=10545 + 30 + 20 + 10 = 105: at least one sector is wrong.

4. Count for frequency 0.150.15: 0.15×40=60.15 \times 40 = 6. The counts so far: 14+10+6=3014 + 10 + 6 = 30, so the last count is 4030=1040 - 30 = 10, with frequency 1040=0.25\frac{10}{40} = 0.25. (Check: 0.35+0.25+0.15+0.25=10.35 + 0.25 + 0.15 + 0.25 = 1.)

5. Angles: 0.40×360=1440.40 \times 360 = 144^\circ, 0.35×360=1260.35 \times 360 = 126^\circ, 0.25×360=900.25 \times 360 = 90^\circ; and 144+126+90=360144 + 126 + 90 = 360^\circ: the pie closes.

6. 2.410=0.24=24%\frac{2.4}{10} = 0.24 = 24\,\% of the ballots came back.

7. Telephone directories and car registries listed mostly wealthy households, whose vote differed from the country’s; the 2.42.4 million answers were a giant count drawn from the wrong population. As in question 1: what matters is not how many you count, but whom — a frequency computed on a distorted sample describes the sample, not the country.

8. True support: 0.7×1000+0.3×9000=700+2700=34000.7 \times 1\,000 + 0.3 \times 9\,000 = 700 + 2\,700 = 3\,400 supporters out of 1000010\,000: 34%34\,\%. The poll: 0.7×500+0.3×500=350+150=5000.7 \times 500 + 0.3 \times 500 = 350 + 150 = 500 out of 10001\,000: 50%50\,\% — sixteen points too high, because the wealthy are half the sample but a tenth of the town.

9. Replies: 0.4×200=800.4 \times 200 = 80 unhappy and 0.1×800=800.1 \times 800 = 80 happy, so 160160 replies of which 8080 unhappy: measured unhappiness 80160=50%\frac{80}{160} = 50\,\%. True unhappiness: 2001000=20%\frac{200}{1\,000} = 20\,\%. Nobody lied — the unhappy simply reply more, and the survey hears them louder.

10. True proportions: one tenth wealthy, so 100100 wealthy and 900900 modest interviews: 0.7×100+0.3×900=70+270=3400.7 \times 100 + 0.3 \times 900 = 70 + 270 = 340 out of 10001\,000: the repaired poll predicts 34%34\,\% — the truth of question 8. Fifty thousand well-chosen interviews beat two million badly chosen ones.

11. Hospital A: mild 90100=90%\frac{90}{100} = 90\,\%; severe 280400=70%\frac{280}{400} = 70\,\%; overall 90+280500=370500=74%\frac{90 + 280}{500} = \frac{370}{500} = 74\,\%.

12. Hospital B: mild 340400=85%\frac{340}{400} = 85\,\%; severe 65100=65%\frac{65}{100} = 65\,\%; overall 340+65500=405500=81%\frac{340 + 65}{500} = \frac{405}{500} = 81\,\%. Hospital A wins on mild cases (90>8590 > 85) and on severe cases (70>6570 > 65).

13. Overall, B shows 81%81\,\% against A’s 74%74\,\%: the hospital that loses in every category wins the total. (This reversal has a name: Simpson’s paradox.)

14. The mixes are opposite: A’s patients are mostly severe (400400 of 500500), B’s mostly mild (400400 of 500500). Severe cases cure less often wherever they are treated, so A’s overall figure is dragged down by the hard cases it accepts — the overall is a weighted blend, and the weights differ between hospitals. A severe patient should choose hospital A: 70%70\,\% beats 65%65\,\% in the only row that concerns them.

15. For instance: “Your comparison blends mild and severe patients, and the two hospitals treat opposite mixes — split by severity, hospital A cures a higher share of both kinds. Overall figures may only be compared when the groups behind them are alike; otherwise the weights, not the quality, decide the winner.”