Quantitative Methods in Social Science 360-300 • CEGEP, Montreal

Revision sheet: frequency distributions and graphs (360-300)

This sheet does not repeat the definitions of the chapter: it deals with the precise places where a correct table turns into a wrong graph, and where a quick reading costs you the critique question. The thread is always the same: in a graph, the eye measures a physical quantity, length or area, and that quantity has to be exactly the one in the data.

It is written for CEGEP Social Science students taking the compulsory Quantitative Methods course, 360-300. The corrected exercise set on the same chapter puts each reflex to work, up to the complete demolition of a newspaper infographic.

Mark this sheet as read or add it to your favourites: a free account, no password, keeps your read sheets and favourites from one visit to the next, tells you which chapter to tackle next and lets you ask for the method or exercise you are missing. Create your space, an email is enough.

The thread of the chapter

A graph is not an illustration of the table, it is a CALCULATION done by eye: the eye measures the length of a bar, the area of a rectangle, the surface of a pictograph. Every deception in this chapter consists in making you read one quantity where the eye is measuring another.

This chapter is part of 360-300, Quantitative Methods in Social Science

The essentials

The four columns of a distribution table

  • • FREQUENCY nin_{i}, RELATIVE FREQUENCY nin\dfrac{n_{i}}{n}, CUMULATIVE frequency, cumulative relative frequency. The relative frequencies sum to 11, up to rounding.
  • • You only CUMULATE on an ordered variable: cumulating nominal categories amounts to adding in an arbitrary order.
  • • Classes must be mutually EXCLUSIVE and EXHAUSTIVE, of equal width unless an explicit decision is made. Convention: closed on the left, open on the right.
  • • Sturges' rule for the number of classes: k=1+3.322log⁡10(n)k=1+3.322\log_{10}(n), then class width =rangek=\dfrac{\text{range}}{k} rounded UP to a convenient value.
152025303540[15, 20)[20, 25)[25, 30)[30, 35)a 20-year-old student
Classes of width 5, closed on the left and open on the right: a 20-year-old student counts in [20, 25) and in it alone; the classes follow each other with no gap or overlap.

Sturges gives a starting point, not an obligation: an exam accepts 66 or 77 classes for n=60n=60, provided the choice is written down.

What the eye measures in each graph

  • • BARS: the eye measures a LENGTH, so the vertical axis must start at zero.
  • • HISTOGRAM: the eye measures an AREA. With classes of unequal widths, the height is the DENSITY =frequencyclass width=\dfrac{\text{frequency}}{\text{class width}}.
  • • CIRCLES and PICTOGRAPHS: the eye measures a SURFACE. To double the surface, multiply the dimensions by 2\sqrt{2}, never by 22.
  • • LINE GRAPH: the eye measures a SLOPE, and truncating the axis there is acceptable provided it is visible.
barsa LENGTHhistograman AREAcirclesa SURFACEline grapha SLOPE
Four graphs, four quantities read by the eye: the length of a bar, the area of a rectangle, the surface of a disk, the slope of a segment (in orange).

The critique question is always answered in two steps: what quantity does the eye measure here, and is it proportional to the data?

The two computations on grouped data

  • • Mean: x‾=∑cinin\overline{x}=\dfrac{\sum c_{i}n_{i}}{n} with cic_{i} the class MIDPOINT, assuming the values are spread uniformly inside.
  • • Median by interpolation: lower limit+n2−previous cumulative frequencyfrequency of the class×class width\text{lower limit}+\dfrac{\frac{n}{2}-\text{previous cumulative frequency}}{\text{frequency of the class}}\times \text{class width}.
  • • The same formula gives any quantile: replace n2\dfrac{n}{2} by n4\dfrac{n}{4} for Q1Q_{1}, by 3n4\dfrac{3n}{4} for Q3Q_{3}.
  • • Both results are ESTIMATES: the raw data would give slightly different values, and that is the price of grouping.
0204080160median 38mean 523030dollars
Density histogram of the example: the median 38 leaves 30 students on each side (two equal areas), the mean 52 is pulled to the right by the wide class.

Writing “assuming a uniform spread within the class” earns the rigour mark, and takes five seconds.

The mistakes that cost marks

These are the errors I correct most often in session. Each one costs marks on a paper, even when the reasoning behind it is right.

1. Cumulating frequencies on a nominal variable

1 mark, and the whole column is crossed out

What not to write

“Programs: Social Science 30%, Natural Science 25%, Arts 20%... cumulated to 55% for the first two.”

What to write

“The variable is nominal: the cumulative column makes no sense, since it would depend on the order in which I wrote the programs.”

Soc.30%Nat.55%Arts75%Other100%order 1Arts20%Soc.50%Other75%Nat.100%order 2
The same four programs written in two orders: the “cumulation” at the second rank is 55% or 50%, depending on the order chosen. It measures nothing. (Soc. = Social Science, Nat. = Natural Science.)

Why: A cumulative frequency answers the question “how many below this value”. Without an order, “below” means nothing.

2. Drawing the histogram in frequencies when the classes are unequal

2 marks, and the reading of the graph that follows is wrong

What not to write

“The frequencies are 1212, 2020, 1616 and 1212: I draw four bars of those heights.”

What to write

“The widths are 2020, 2020, 4040 and 8080, so the heights are the DENSITIES 0.60.6, 1.01.0, 0.40.4 and 0.150.15: the area of each bar must equal the frequency.”

height = frequency: WRONGthe wide class looks hugeheight = density: RIGHTthe AREA gives the frequency02040801600204080160
On the left, the last class alone covers more than 40%40\% of the area although it holds only 1212 observations out of 6060; on the right, each area equals its frequency.

Why: With raw heights, the class from 4040 to 8080 takes up about 1.61.6 times as much area as the one from 2020 to 4040 (16×4016\times 40 against 20×2020\times 20) while containing fewer people: the drawing says the opposite of the table.

3. A truncated vertical axis on a bar chart

the whole critique question, which almost always turns on this

What not to write

“The graph shows it clearly: candidate C is far ahead.”

What to write

“The axis starts at 5050%. The three values are 5252, 5555 and 5858%: the real gap is six points, but the bar for C looks four times as long as the one for A.”

axis from 0three close valuesaxis cut at 50C looks four times A060506052%55%58%52%55%58%ABCABC
The same three percentages, on the left on an axis starting at zero, on the right on an axis cut at 5050: the bar for C becomes four times that of A.

Why: On bars, the eye compares LENGTHS. Cutting off the bottom of the axis multiplies the length ratios without touching the data: it is the most common deception in the press.

4. Doubling the height of a pictograph to double the value

1 mark, and more if the question asks you to correct the graph

What not to write

“The value doubled, so I draw the figure twice as big.”

What to write

“Doubling both dimensions QUADRUPLES the surface. To double the area, I multiply the dimensions by 2≈1.41\sqrt{2}\approx 1.41, or better, I repeat the same pictograph twice.”

doubling the side quadruples the areaarea 4area 1side 1side 2
The large square has a side twice as long and a surface four times as large: it is this surface that the reader compares, without knowing it.

Why: The eye reads the surface, not the height. The same trap governs proportional circles: the ratio of the RADII is the square root of the ratio of the values.

5. Joining the bars of a qualitative variable

0.5 mark per graph, systematically deducted

What not to write

“I draw the histogram of the study programs.”

What to write

“The programs form a qualitative variable: it is a BAR CHART, with separated bars. The histogram is reserved for continuous variables grouped into classes.”

Soc.Nat.ArtsOthertouching bars: WRONGSoc.Nat.ArtsOtherseparated bars: RIGHT
A qualitative variable: separated bars, because between two programs nothing exists. Touching, they would suggest a continuous variable. (Soc. = Social Science, Nat. = Natural Science.)

Why: The gap between bars is a sign and not a decoration: it says that between two categories, nothing exists. On a continuous variable, between two classes, values do exist.

6. Computing the grouped mean on the class limits

2 marks, since the whole mean is wrong

What not to write

“Class [20,40)[20, 40), frequency 2020: I take 20×2020\times 20.”

What to write

“The representative of a class is its MIDPOINT: c=20+402=30c=\dfrac{20+40}{2}=30, so 30×20=60030\times 20=600.”

0102030405060class [20, 40), frequency 20limit: 20 × 20midpoint: 30 × 20
The class [20, 40) is represented by its midpoint 30; the limit 20 shifts every class down by half a width, and the whole mean with it.

Why: Systematically taking the lower limit underestimates the mean by half a class width, here 1010 dollars: the error is regular and therefore invisible to a plausibility check.

7. Giving the median class instead of the median

1.5 marks, half the question

What not to write

“The median lies in the class [20,40)[20, 40), so the median is 3030.”

What to write

“The median class is [20,40)[20, 40); by interpolation, M=20+30−1220×20=38M=20+\dfrac{30-12}{20}\times 20=38.”

02040801601230486032M = 38midpoint 30: wrongdollarscumulative frequency
Polygon of cumulative frequencies: the ordinate 30 is reached at 38 (green), not at the midpoint 30 of the median class (red), because 12 students are already counted before 20.

Why: The midpoint of the median class is the median only if exactly half of the observations lie before the class. The interpolation is there precisely to account for the cumulative frequency already reached.

8. Interpreting the crossing of two curves on a dual axis

the whole conclusion of the question

What not to write

“The two curves cross in 2019: that is the year unemployment caught up with inflation.”

What to write

“The two axes have different units and bounds: the crossing point depends entirely on those bounds and means nothing.”

13.523.513.526right axis from 2 to 3.5right axis from 2 to 6same datasame data
The same two series; only the scale of the right axis changes, and the crossing (circled in red) jumps from one year to another.

Why: Changing the upper bound of one of the two axes moves the crossing wherever you like. On a dual axis, only the SHAPES of the two curves can be compared, never their relative position.

Which method to choose

Which graph does the scale allow?

Look at the TYPE of the variable and the number of categories before choosing a graph, never the other way round.

pie chartgrouped barshistogramdensitiescumulative
The five shapes of the tree: pie chart for a shared whole, grouped bars, histogram with equal classes, histogram of densities, cumulative frequency curve.
  • If qualitative variable, few categories, and the total means something → pie chart or bar chart

    Example: respondents by program

    beyond five or six shares, the pie chart becomes unreadable

  • If qualitative or discrete variable, several groups to compare → GROUPED bar chart, separated bars, axis starting at zero

    Example: satisfaction by program

  • If continuous variable grouped into classes of EQUAL width → histogram of frequencies, touching bars

    Example: ages in five-year bands

  • If continuous variable grouped into classes of UNEQUAL width → histogram of DENSITIES: height =frequencyclass width=\dfrac{\text{frequency}}{\text{class width}}

    Example: incomes, whose last class is always very wide

  • If you want to compare two distributions, or read quantiles → frequency polygon, or cumulative frequency curve

    Example: two cohorts superimposed on the same axis

If the variable is nominal, no branch leads to a histogram or to a cumulative curve: that is where the question expects the mistake.

What deception does this graph hide?

On an infographic to critique, go through this list in order: the first flaw you find is the one the question expects.

cut axisdensity forgottenareadual axisuneven time
The five flaws, in the order of the tree: cut axis, wide class in frequency, quadrupled surface, dual-axis crossing, unevenly spaced years.
  • If the vertical axis does not start at zero although these are bars → TRUNCATED AXIS: recompute the real gaps and compare them with the drawn lengths

    Example: three bars of 52, 55 and 58% on an axis starting at 50

  • If the classes of a histogram do not have the same width → DENSITY FORGOTTEN: recompute the heights

    Example: a last class “80 and over”

  • If drawings or circles have been enlarged proportionally → SURFACE: the ratio of the areas is the SQUARE of the ratio of the lengths

    Example: a banknote twice as tall

  • If two series share a graph with two vertical axes → DUAL AXIS: compare only the shapes, never the positions or the crossings

    Example: unemployment on the left, inflation on the right

  • If the horizontal axis skips periods or changes its step → UNEVEN TIME AXIS: the drawn slope is not the real speed

    Example: 2010, 2011, 2015, 2016 equally spaced

A graph can carry two flaws at once: name both, each is worth its mark.

How the answer is expected to be written

A marker ticks steps. Here they are in order, with the concluding sentence expected word for word.

Building a distribution table with classes

When to use it: When the question gives raw data and asks for a table, a histogram or grouped statistics.

  1. 1 Find the minimum, the maximum and the range, and write them down.
  2. 2 Propose a number of classes with Sturges, k=1+3.322log⁡10(n)k=1+3.322\log_{10}(n), then state the number RETAINED and why.
  3. 3 Compute the class width rangek\dfrac{\text{range}}{k} and round it UP to a convenient value.
  4. 4 Write the limits following the convention closed on the left, open on the right, and check that the last class contains the maximum.
  5. 5 Build the four columns, then check that the sum of the frequencies gives back nn and that the last cumulative relative frequency equals 11.

Concluding sentence

“For n=60n=60 observations with a range of 155155 dollars, Sturges' rule gives k≈6.9k\approx 6.9: I retain 77 classes of width 2525 dollars, the first starting at 00.”

The trap: Rounding the width down: the last class then no longer contains the maximum and the table is not exhaustive.

Marking: 1 mark for Sturges, 1 mark for the width rounded up, 2 marks for the columns, 1 mark for the checks.

Computing the median from grouped data

When to use it: As soon as the question gives a table of classes and asks for the median, a quartile or a percentile.

  1. 1 Build the column of cumulative frequencies, if it is not already there.
  2. 2 Compute the rank sought: n2\dfrac{n}{2} for the median, n4\dfrac{n}{4} for Q1Q_{1}, 3n4\dfrac{3n}{4} for Q3Q_{3}.
  3. 3 Find the class where the cumulative frequency reaches this rank, and note its lower limit, its frequency and its width.
  4. 4 Apply the interpolation and write the unit of the result.
  5. 5 Check that the result does fall inside the class found.

Concluding sentence

“The median class is [20,40)[20, 40): M=20+30−1220×20=38M=20+\dfrac{30-12}{20}\times 20=38 dollars, assuming a uniform spread within the class.”

The trap: Using the cumulative frequency of the median class itself instead of that of the PREVIOUS class: the formula then returns a value outside the class.

Marking: 1 mark for the class found, 2 marks for the interpolation, 1 mark for the assumption written down.

Check before you hand in

Five minutes of checking recover more marks than one more problem started in a hurry.

The typical problem, taken apart

From raw data to the histogram, with unequal classes

Sixty students report their weekly transportation spending, in dollars. The grouping used is: [0,20)[0, 20) with 1212 students, [20,40)[20, 40) with 2020, [40,80)[40, 80) with 1616, [80,160)[80, 160) with 1212.

The question asks for the histogram, the mean and the median, then a comment on the shape of the distribution.

020408016012201612frequency of each classdollars
The grouping in the question: four classes of widths 20, 20, 40 and 80, and their frequencies.

Step 1

Cumulative frequencies: 1212, 3232, 4848, 6060. Relative frequencies: 0.200.20, 0.3330.333, 0.2670.267, 0.200.20.

Why

The cumulative frequencies serve for the median and the relative frequencies for comparison with another cohort: both columns are done at the same time, never in two passes.

Step 2

Sturges would give k=1+3.322log⁡10(60)≈6.9k=1+3.322\log_{10}(60)\approx 6.9, so 77 equal classes. The proposed grouping has only 44, of unequal widths.

Why

You have to say so, and say why it is legitimate: spending is spread out toward the top, and equal classes would leave three empty classes on the right.

Step 3

Widths 2020, 2020, 4040, 8080; densities 1220=0.6\dfrac{12}{20}=0.6, 2020=1.0\dfrac{20}{20}=1.0, 1640=0.4\dfrac{16}{40}=0.4, 1280=0.15\dfrac{12}{80}=0.15.

02040801600.150.40.61densitydollars

Why

This is the step that earns the most marks and the one skipped most often. Without it, the drawing says that the last class is the most populated when it is the least dense of all.

Step 4

Midpoints 1010, 3030, 6060, 120120; x‾=12(10)+20(30)+16(60)+12(120)60=312060=52\overline{x}=\dfrac{12(10)+20(30)+16(60)+12(120)}{60}=\dfrac{3120}{60}=52 dollars.

Why

The midpoint, not the limit: taking the lower limits would give 33.3333.33 dollars instead of 5252, an underestimate of nearly 1919 dollars on an average expense.

Step 5

Rank 602=30\dfrac{60}{2}=30; the cumulative frequency reaches 3030 in [20,40)[20, 40), so M=20+30−1220×20=38M=20+\dfrac{30-12}{20}\times 20=38 dollars.

Why

The cumulative frequency used is that of the PREVIOUS class, 1212, and not 3232. This is the only difficulty of the formula and it is where the mark is lost.

Step 6

Check: 0.6(20)+1.0(20)+0.4(40)+0.15(80)=600.6(20)+1.0(20)+0.4(40)+0.15(80)=60, and M=38<x‾=52M=38<\overline{x}=52.

Why

The total area gives back the frequency, so the densities are right. The median being below the mean confirms the spread toward the right, consistent with the very wide class at the end.

The conclusion, written out

“The median spending is 3838 dollars and the mean spending is 5252 dollars. The gap between the two, and the density collapsing to 0.150.15 in the last class, describe a distribution spread out to the right: a minority of students spend a lot.”

The classic mistake on this problem: Drawing four bars of heights 1212, 2020, 1616 and 1212: the last class then takes up over 40%40\% of the area of the graph for a fifth of the students.

Learn by heart

  • • You only CUMULATE on an ordered variable. On a nominal one, the cumulative column does not exist.
  • • HISTOGRAM: touching bars, continuous variable. BAR CHART: separated bars, qualitative or discrete variable.
  • • Unequal classes: height =frequencyclass width=\dfrac{\text{frequency}}{\text{class width}}, so that the AREA equals the frequency.
  • • On bars, the vertical axis starts at ZERO. On a line graph, a visible truncation is acceptable.
  • • Doubling the dimensions QUADRUPLES the surface. To double the area, multiply by 2\sqrt{2}.
  • • Grouped mean: the class MIDPOINT, never the limit. Grouped median: the cumulative frequency of the PREVIOUS class.
  • • On a dual vertical axis, the point where the two curves cross means nothing.

Frequently asked questions

How do you compute the height of the bars of a histogram with unequal classes?

The height is the density, that is the frequency of the class divided by its width. A class of 40 units containing 16 observations gives a height of 0.4. We do this so that the area of each bar, not its height, represents the frequency: it is the area that the eye compares on a histogram.

What is the difference between a histogram and a bar chart?

The histogram is for continuous variables grouped into classes and its bars touch, because between two classes there are values. The bar chart is for qualitative or discrete variables and its bars are separated, because between two categories there is nothing. The gap between the bars is therefore information.

How do you find the median from a table of classes?

Find the class where the cumulative frequency reaches half of the total frequency, then interpolate: start from the lower limit of that class and add the class width multiplied by the gap between half the total frequency and the cumulative frequency of the previous class, divided by the frequency of the class. The result must fall inside the class found.

Why is an axis that does not start at zero misleading?

On a bar chart, the reader compares lengths. If the axis starts at 50, a value of 52 becomes a bar two units long and a value of 58 a bar eight units long: the second looks four times the first although the real gap is six points out of fifty-eight. Truncation multiplies the ratios without touching the data.

How many classes should you use to group data?

Sturges' rule gives a starting point: one plus 3.322 times the base 10 logarithm of the number of observations, which gives about seven classes for sixty observations. It is not an obligation: you round to a convenient number and choose a round width, provided you write down the choice and check that the last class contains the maximum.

Practise it

Corrected exercises: Frequency distributions and graphs, 360-300

A method is proved on a paper, not on a sheet. The set for the same chapter takes each of these traps into a problem, with the solution written out step by step.

  • 10 corrected exercises
  • 100 points
  • 150 minutes
Do the exercises
Something missing from this sheet? A method, a trap, an exercise to practise it, a mistake you spotted: tell me, I read every request.

Sending goes through your free space: that is how I can answer you and tell you when the exercise is added. An email is enough, no password. Create your space. Rather not create an account? Write to me directly.

What is it about?
I read every request myself, nobody else sees it. No need to write your name or your school.
When your request is dealt with, you hear about it by email and in your space.

By sending, you agree that I read your request to answer it. It is kept with your account, erased with it, and never published: privacy policy.

Previous sheet Sampling and questionnaires Next sheet Z scores, percentile ranks and the R score

© Ahmed Squalli Houssaini. Revision sheet published at www.letuteurscientifique.ca/en/fiches/cegep-qm-frequency-tables-graphs. Free for personal and classroom use; republishing it elsewhere requires written permission (legal notice).

See also

Looking for a 360-300 tutor in Montreal?

Get in touch for a first session. We go back over the choices that cost marks in Quantitative Methods, from the density of a wide class to the truncated axis, then we test them on exercises at the level of real CEGEP tests.

Site by Studio Squalli