S1 2.2, S1 2.3 - Location and spread

S1 2.2, S1 2.3 - Location and spread

Use measures of location in S1 2.2 to describe a typical value, and measures of dispersion in S1 2.3 to describe variability. Calculate and interpret summaries for raw and grouped data, estimate percentiles by interpolation, and recover summaries after coding.

Mean median and mode for data types

If every delivery takes ten minutes longer, its mean increases by ten minutes. Does its variability increase too? We will separate where a distribution lies from how widely its observations vary.

Discrete data take separated possible values, such as numbers of parcels. Continuous data measure quantities such as time or mass. Either can be given as individual observations, an exact-value frequency table, or a grouped table. Grouping loses the positions of observations within each class.

Measures of location

The mean is the total divided by the number of observations. The median is the central ordered value, or the average of the two central values when there are an even number. The mode is a most frequent value; there may be several modes or no useful unique mode.

The mean uses every observation and is sensitive to a few extreme values. The median depends on position and is usually less affected by extremes. A mode can describe the most common category, such as a colour, even when a numerical mean would have no meaning.

Mean from a frequency table

For values xx with frequencies ff,

xˉ=∑fx∑f.\bar x=\frac{\sum fx}{\sum f}.

The symbol ∑\sum means “add all the relevant terms”. For raw data this becomes xˉ=∑x/n\bar x=\sum x/n. For grouped data, substitute class midpoints for xx to estimate the mean. These mean formulae are not printed in the formula booklet: learn them.

Use cumulative frequencies to locate a median, rather than treating each row as one observation. For grouped continuous data, identify the median class first; interpolation in the next part will estimate a value within it. With unequal class widths, the modal class is the class with greatest frequency density, rather than necessarily greatest frequency.

Worked example 1: exact values and frequencies

Question. Values 10,20,3010,20,30 occur with frequencies 2,5,32,5,3, respectively. Find the mean, median and mode.

Plan. Weight each value by its frequency, then locate the middle observations in the ordered list.

n=2+5+3=10∑fx=2(10)+5(20)+3(30)=210xˉ=210/10=21\begin{aligned} n&=2+5+3=10\\ \sum fx&=2(10)+5(20)+3(30)=210\\ \bar x&=210/10=21 \end{aligned}

Cumulative frequencies are 2,7,102,7,10, so the fifth and sixth values are both 2020. The greatest frequency is 55, attached to 2020.

Answer. Mean 2121, median 2020, mode 2020.

Check. Relative to 2020, the two tens contribute −20-20 and the three thirties contribute +30+30, a net +10+10. Sharing this among ten values gives mean 20+1=2120+1=21.

Change only how precisely the values are known: replace exact values by classes with the same midpoints and frequencies.

Worked example 2: grouped measurements

Question. Lengths have frequencies 2,5,32,5,3 in the classes 5≤x<155\le x<15, 15≤x<2515\le x<25, 25≤x<3525\le x<35 centimetres. Estimate the mean and identify the median and modal classes.

Plan. Represent each class by its midpoint, then use frequency positions and densities.

xˉ^=2(10)+5(20)+3(30)10=21 cm.\widehat{\bar x}=\frac{2(10)+5(20)+3(30)}{10}=21\,\mathrm{cm}.

The middle observations are in 15≤x<2515\le x<25. All widths are 1010, so the greatest frequency also gives the greatest density.

Answer. Estimated mean 21 cm21\,\mathrm{cm}; both the median class and modal class are 15≤x<2515\le x<25. The exact mean, median and mode are not recoverable from these grouped data.

Check. The estimate matches Example 1 because the midpoint calculation is the same. Its status has changed: the measurements need not equal their class midpoints.

The choice of summary depends on the question being asked, not on which number is quickest to calculate.

Watch out

Do not divide ∑fx\sum fx by the number of rows. Divide by ∑f\sum f, the total number of observations. A grouped midpoint is a representative value, not a claim that every observation equals it.

Estimate a mean from new grouped measurements.

Range interpercentile ranges and interpolation

A measure of spread says how far apart observations are; a percentile range can focus on a chosen central portion instead of the extremes.

The range is maximum minus minimum. The percentile PpP_p marks the position below which approximately p%p\% of observations lie. Thus Q1=P25Q_1=P_{25}, the median is P50P_{50}, and Q3=P75Q_3=P_{75}. The interquartile range Q3−Q1Q_3-Q_1 spans the middle 50%50\%; P90−P10P_{90}-P_{10} spans the middle 80%80\%. A large range with a small IQR suggests that the extremes are much more separated than the central half.

For grouped continuous data, use target cumulative frequency r=pn/100r=pn/100. If it falls within a class, linear interpolation assumes a uniform spread within that class. Covering a fraction of the class frequency therefore covers the same fraction of its width.

Grouped percentile interpolation

If the target position rr lies in a class with lower boundary LL, width ww, frequency ff and cumulative frequency cc before the class, then

Pp≈L+r−cfw,r=pn100.P_p\approx L+\frac{r-c}{f}w,\qquad r=\frac{pn}{100}.

The IQR is Q3−Q1Q_3-Q_1. These results are not printed in the formula booklet: learn them. Interpolation estimates a value; it does not recover the individual observations.

The subtraction r−cr-c counts how many observations into the selected class you need to go. The denominator is that class's frequency, not its cumulative frequency. If a target falls exactly at a class boundary, either adjacent-class calculation gives that boundary.

Use the following grouped waiting times:

Waiting time tt, minutesFrequencyCumulative frequency
0≤t<100\le t<1088
10≤t<2010\le t<201220
20≤t<4020\le t<402040

[DIAGRAM: asset_name: Grouped quartile interpolation; asset_slug: grouped-quartile-interpolation; caption: Going two observations into a class of twelve means going two twelfths of the way across its width.; description: The waiting-time class ten to twenty minutes contains twelve observations, with eight observations before it. A target cumulative frequency of ten lies two of those twelve observations into the class, at eleven and two thirds minutes. The first two twelfths of the interval are shaded separately.]
Going two observations into a class of twelve means going two twelfths of the way across its width.

Worked example 3: the lower quartile

Question. Estimate Q1Q_1 for the 4040 waiting times in the table.

Plan. Locate cumulative frequency 40/4=1040/4=10, then interpolate in the class containing it.

The tenth position lies in 10≤t<2010\le t<20, with 88 observations before it.

Q1≈10+10−812(20−10)=353≈11.7 min.Q_1\approx10+\frac{10-8}{12}(20-10) =\frac{35}{3}\approx11.7\,\mathrm{min}.

Answer. Estimated lower quartile 11.7 min11.7\,\mathrm{min}, to 33 significant figures.

Check. Only 22 of the 1212 class observations are needed, so the estimate is one sixth of the way from 1010 to 2020.

Change only the requested percentile, from 25%25\% to 75%75\%. The new position lies in a different class, so its width and preceding cumulative frequency must change too.

Worked example 4: the upper quartile and IQR

Question. Estimate Q3Q_3 for the same data and hence find the IQR.

Plan. Locate cumulative frequency 3(40)/4=303(40)/4=30, interpolate, then subtract the unrounded lower quartile.

Q3≈20+30−2020(40−20)=30IQR≈30−353=553≈18.3 min\begin{aligned} Q_3&\approx20+\frac{30-20}{20}(40-20)=30\\ \mathrm{IQR}&\approx30-\frac{35}{3}=\frac{55}{3}\approx18.3\,\mathrm{min} \end{aligned}

Answer. Q3≈30 minQ_3\approx30\,\mathrm{min} and IQR ≈18.3 min\approx18.3\,\mathrm{min}.

Check. The thirtieth position is halfway through the final class's 2020 observations, matching the midpoint 3030 of its boundaries. The IQR is positive and smaller than the full class span of 4040 minutes.

The same process gives P10≈0+(4/8)10=5P_{10}\approx0+(4/8)10=5 and P90≈20+((36−20)/20)20=36P_{90}\approx20+((36-20)/20)20=36. Their difference, 3131 minutes, spans the estimated central 80%80\%. These class boundaries do not tell us the exact sample minimum or maximum, so 4040 is not necessarily the actual range.

You can also interpolate between known percentile positions. For example, moving halfway from Q1Q_1 to the median corresponds to moving halfway from cumulative proportion 0.250.25 to 0.500.50, giving 0.3750.375, provided the same uniform-spread assumption is made for that interval. This is an estimate, not information supplied by the box plot alone.

Watch out

Do not use Q3=3Q1Q_3=3Q_1. Quartiles refer to positions in the ordered data, not multiples of the measured values. Keep unrounded values when subtracting two estimated percentiles.

Continue this lesson.

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

Create free account