5.1 - Cumulative frequency and quartiles

5.1 - Cumulative frequency and quartiles

A grouped table can tell you how many observations lie below a boundary even when the individual values are unknown. In this part of 5.1, you will build cumulative frequency graphs, find medians and quartiles, and compare datasets using box-and-whisker plots. You will distinguish exact summaries of raw data from estimates made within grouped classes.

Cumulative frequency

If 3030 people record their waiting times, how can you estimate the fraction who wait between 1515 and 2525 minutes without knowing each time? A running total turns that question into the difference between two graph readings.

Suppose 44 waits are below 1010 minutes and a further 1212 are between 1010 and 2020. Then 4+12=164+12=16 waits are below 2020, not 1212.

Cumulative frequency

The cumulative frequency at a boundary is the total number of observations below that boundary. For grouped continuous data, add frequencies successively and plot the running totals against the upper class boundaries. Start with frequency zero at the lowest boundary.

Label both axes and use linear numerical scales. The graph cannot decrease: increasing the boundary cannot remove observations already counted. Join plotted points with an increasing curve when requested. Joining them with straight line segments gives the linear interpolation model used in this lesson: it assumes values are spread evenly within each class.

Worked example 1: plotting running totals

Question. Construct a cumulative frequency graph for these waiting times.

Waiting time tt, minutesFrequencyCumulative frequency
0≤t<100\le t<104444
10≤t<2010\le t<2012121616
20≤t<3020\le t<30882424
30≤t<5030\le t<50663030

Plan. Add down the frequencies, then pair each running total with its upper boundary.

Plot

(0,0), (10,4), (20,16), (30,24), (50,30).(0,0),\ (10,4),\ (20,16),\ (30,24),\ (50,30).

The first point records that no waits are below the lowest boundary. For example, (20,16)(20,16) means 1616 waits are below 2020 minutes.

Answer. The increasing graph below, joining the plotted points. It finishes at the total frequency 3030.

Check. Differences between successive cumulative frequencies are 4,12,8,64,12,8,6, recovering the original frequencies. Plotting at the midpoints would attach those counts to the wrong waiting times.

The dashed reading at 1515 minutes will help answer the opening question.

[DIAGRAM: asset_name: Boundaries and running totals; asset_slug: data-cumulative-boundaries; caption: Plot cumulative frequencies at upper boundaries and begin at zero at the lowest boundary; description: Increasing piecewise linear cumulative frequency graph of waiting time with labelled points 0 comma 0, 10 comma 4, 20 comma 16, 30 comma 24, 50 comma 30. Dashed lines read across and down from the point 15 comma 10 to show an estimated count of 10 below 15 minutes. Both axes use numbered linear scales.]
Plot cumulative frequencies at upper boundaries and begin at zero at the lowest boundary

Now keep the same running-total method but change how the measurements are recorded. Whole-number class labels for rounded measurements need continuous boundaries.

Worked example 2: measurements recorded to the nearest unit

Question. Lengths recorded to the nearest centimetre are grouped as follows. State the points for a cumulative frequency graph.

Recorded length, cm1010–19192020–29293030–3939
Frequency66101044

Plan. Convert the rounded classes to continuous boundaries, then use upper boundaries and running totals.

A recorded 1919 cm represents lengths up to 19.519.5 cm; a recorded 2020 cm starts at 19.519.5 cm. Thus the boundaries are 9.5,19.5,29.5,39.59.5,19.5,29.5,39.5, with successive totals 0,6,16,200,6,16,20.

Answer. Plot (9.5,0)(9.5,0), (19.5,6)(19.5,6), (29.5,16)(29.5,16) and (39.5,20)(39.5,20), with length in cm horizontally and cumulative frequency vertically.

Check. Every class has width 1010 cm. The final total 2020 equals 6+10+46+10+4, and the first increase recovers the first frequency 66.

If a table instead says 10≤x<2010\le x<20, those are already its boundaries; do not subtract 0.50.5. Nor should you introduce half-unit boundaries for an exact discrete count unless a continuous grouped model is actually being used.

To read a count below a given value, go vertically from the value to the graph, then horizontally to the cumulative-frequency axis. In Example 1, linear interpolation gives

F(15)=4+510(12)=10,F(25)=16+510(8)=20.F(15)=4+\frac{5}{10}(12)=10, \qquad F(25)=16+\frac{5}{10}(8)=20.

Here F(t)F(t) denotes the estimated count below tt, rather than a proportion. Hence the estimated fraction between 1515 and 2525 minutes is (20−10)/30=1/3(20-10)/30=1/3. Above 2525 minutes, subtract from the total: 30−20=1030-20=10 waits. Boundary inclusion does not change these continuous-model estimates; exact discrete counts require their stated inequalities.

Watch out

The count between two values is the difference of two cumulative frequencies, not their sum. Divide by the total only when a proportion is requested.

Convert the next rounded table before choosing the plotting positions.

Medians, quartiles and percentiles

A percentile answers the reverse question: what value has a specified percentage of the observations below it? Instead of starting on the horizontal axis, start with a cumulative count.

Median, quartiles and percentiles

The median, Q2Q_2, divides an ordered distribution into two halves. The lower quartile, Q1Q_1, and upper quartile, Q3Q_3, mark the lower and upper quarters. The interquartile range is Q3−Q1Q_3-Q_1, measuring the spread of the middle half. The pthp\text{th} percentile has approximately p%p\% of observations below it.

For raw data, sort first. The median is the middle observation if the count is odd, or the mean of the two middle observations if it is even. To find raw-data quartiles here, take the median of the lower half and of the upper half; exclude the overall middle observation when the count is odd. For example, in 2,4,5,7,9,11,13,16,202,4,5,7,9,11,13,16,20, the median is 99, while the halves give Q1=(4+5)/2=4.5Q_1=(4+5)/2=4.5 and Q3=(13+16)/2=14.5Q_3=(13+16)/2=14.5. Follow a convention explicitly stated in a question if one is supplied.

Worked example 3: exact quartiles from raw values

Question. Find the median and interquartile range of

4, 5, 7, 8, 9, 10, 12, 14, 16, 18, 20, 23.4,\ 5,\ 7,\ 8,\ 9,\ 10,\ 12,\ 14,\ 16,\ 18,\ 20,\ 23.

Plan. Locate the middle pair of the full list, then the middle pair of each six-value half.

Q2=10+122=11Q1=7+82=7.5Q3=16+182=17IQR=17−7.5=9.5\begin{aligned} Q_2&=\frac{10+12}{2}=11\\ Q_1&=\frac{7+8}{2}=7.5\\ Q_3&=\frac{16+18}{2}=17\\ \text{IQR}&=17-7.5=9.5 \end{aligned}

Answer. Median 1111; interquartile range 9.59.5.

Check. Six observations lie on either side of 1111. The quartiles sit halfway between positions 33 and 44, and between positions 99 and 1010, as required by the two halves.

The next example changes the information available: only grouped counts are known. Use cumulative levels n/4,n/2,3n/4n/4,n/2,3n/4, or pn/100pn/100 for a percentile. Read across to the graph and down to the value axis. These are distribution estimates, not a rule telling you to round raw-data positions.

For straight-line interpolation within a class, the fraction of the class frequency needed is also the fraction of the class width needed.

Linear interpolation within a class

If a target cumulative count rr lies in a class with lower boundary LL, width ww, frequency f>0f>0, and cumulative frequency CC before that class,

estimated value=L+r−Cfw.\text{estimated value}=L+\frac{r-C}{f}w.

This assumes an even spread within the class. Not in the formula booklet: learn the reasoning.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account