Probability and Statistics 201-SN1-RE • CEGEP, Montreal

Corrected exercises: descriptive statistics (201-SN1-RE)

Here are ten corrected exercises in descriptive statistics from the CEGEP course Probability and Statistics 201-SN1-RE, preceded by a list of direct calculations.

What the set covers, the traps it targets

They cover the first element of competency 0M01: population, sample and statistical variable, discrete and continuous variables, graphical representations, tabulated data and data grouped into classes, measures of central tendency (mean, median, mode), of dispersion (variance, standard deviation) and of position (z-score, percentile rank), with quartiles and the box plot in support.

By the end of the set, you can choose between the mean and the median according to the shape of the distribution and the question asked (exercises 2 and 10), compute a standard deviation by hand and prove the computing formula (exercise 3), compare two individuals from two populations through their z-scores (exercise 4), make a decision with a box plot (exercise 5), interpolate a median and a percentile within classes (exercise 6), and prove with the derivative that the mean minimizes the sum of squared deviations, then why we divide by n minus 1 (exercise 7). The situations come from the environmental sciences: air quality, a river in flood, the temperature of a lake, a trout survey, ice thickness, turtle eggs, nitrates in private wells and a summer's precipitation. Exercises 9 and 10 are two complete studies, from the data to the written conclusion.

Pitfalls treated in detail: reading the median in time order instead of from the sorted data (exercise 2), rounding the mean before the computing formula and getting a negative sum of squares (exercise 3), comparing centimetres instead of z-scores (exercise 4), confusing an outlier with an erroneous value (exercises 5 and 9), averaging the class midpoints without their frequencies (exercise 6), judging a standard on the mean (exercise 9) and using the frequencies as heights with unequal classes (exercise 10).

The thread of the set: a summary does not replace the distribution. Its shape, skewness, extreme value or grouping into classes, chooses the measure to publish, and the standard deviation gives the scale for judging a deviation. The data are fictitious, and the quartile and percentile rank conventions are stated in each problem: follow your college's if they differ.

  • 11 corrected exercises • 110 points • 150 minutes
  • Self-checking, 114 answers
  • Calculator
Start exercise 0.1 The chapter sheet

Course recap

  • • POPULATION AND SAMPLE: the population is the whole set the question is about; the sample, the part that is observed. A parameter (μ\mu, σ\sigma) describes the population, a statistic (x‾\overline{x}, ss) the sample.
  • • VARIABLES: categorical nominal or ordinal; quantitative discrete (isolated values, bar chart) or continuous (interval, histogram). Classify the quantity, not the precision of the device.
  • • CENTRAL TENDENCY: x‾=∑xinin\overline{x}=\dfrac{\sum x_{i}n_{i}}{n}; median in the middle of the SORTED data; mode, the most frequent value or class. Right skew: in general mode << median << mean.
  • • DISPERSION: s2=∑(xi−x‾)2n−1=∑xi2−nx‾2n−1s^{2}=\dfrac{\sum(x_{i}-\overline{x})^{2}}{n-1}=\dfrac{\sum x_{i}^{2}-n\overline{x}^{2}}{n-1} for a sample; divisor nn for a population. ss is in the unit of the data.
  • • CLASSES: midpoints cic_{i} in place of the data; median and percentiles by interpolation, Pk=L+k100n−Fnc×wP_{k}=L+\dfrac{\frac{k}{100}n-F}{n_{c}}\times w. Unequal classes: height == density niwi\dfrac{n_{i}}{w_{i}}, the area is the frequency.
  • • POSITION: z=x−x‾sz=\dfrac{x-\overline{x}}{s}; percentile rank PR=N<+12N=n×100PR=\dfrac{N_{<}+\frac{1}{2}N_{=}}{n}\times 100 (convention of this set). Outlier: outside [Q1−1.5 IQR,Q3+1.5 IQR][Q_{1}-1.5\,IQR, Q_{3}+1.5\,IQR], which does not prove an error.
  • • LINEAR TRANSFORMATION: if y=ax+by=ax+b, then y‾=ax‾+b\overline{y}=a\overline{x}+b, sy=∣a∣ sxs_{y}=|a|\,s_{x}, and the z-score is unchanged for a>0a>0.

Calculations: central tendency, dispersion and position

Exercise 0.1: Computing the measures of a data set: twelve direct calculations

12 answers to check

For each line, compute the requested measure, with no context and no interpretation. Round to the hundredth when the result is not exact. A data set labelled “sample” takes the divisor n−1n-1; a data set labelled “population” takes the divisor nn.

Two conventions used in this set; replace them with your college's if they differ. Median of grouped data by interpolation: Med=L+n2−Fnc×w\mathrm{Med}=L+\dfrac{\frac{n}{2}-F}{n_{c}}\times w, where LL is the lower boundary of the median class, FF the cumulative frequency before it, ncn_{c} its frequency and ww its width. Percentile rank: PR(x)=N<+12N=n×100PR(x)=\dfrac{N_{<}+\frac{1}{2}N_{=}}{n}\times 100, where N<N_{<} counts the data strictly below xx and N=N_{=} the data equal to it.

  • a) Data 4.24.2, 5.15.1, 3.83.8, 6.06.0, 4.44.4: compute the mean x‾\overline{x}.
  • b) Data 1313, 88, 2121, 1717, 99, 1515: compute the median.
  • c) Values 11, 22, 33, 44 with frequencies 33, 77, 66, 44 respectively: compute the mean.
  • d) Same table as in c): compute the median.
  • e) Sample 66, 99, 1010, 1313, 1717: compute the variance s2s^{2}.
  • f) Same data as in e), treated as a population: compute the standard deviation σ\sigma.
  • g) Classes [0,4)[0, 4), [4,8)[4, 8), [8,12)[8, 12) with frequencies 55, 1212, 33: compute the mean using the class midpoints.
  • h) Same table as in g): compute the median by interpolation.
  • i) x=68x=68, x‾=52\overline{x}=52, s=6.4s=6.4: compute the z-score of xx.
  • j) x‾=120\overline{x}=120, s=15s=15: compute the data value whose z-score is −1.2-1.2.
  • k) In a data set of 2525 values, 1818 are strictly below xx and xx appears only once: compute the percentile rank of xx.
  • l) x‾=40\overline{x}=40 and s=6s=6: compute the coefficient of variation, as a percentage.

Type your answers, the page tells you right or wrong 0/12

a)
b)
c)
d)
e)
f)
g)
h)
i)
j)
k)
l)
Show the solution

Answers

  • a) x‾=4.7\overline{x}=4.7
  • b) Med=14\mathrm{Med}=14
  • c) x‾=2.55\overline{x}=2.55
  • d) Med=2.5\mathrm{Med}=2.5
  • e) s2=17.5s^{2}=17.5
  • f) σ≈3.74\sigma\approx 3.74
  • g) x‾=5.6\overline{x}=5.6
  • h) Med≈5.67\mathrm{Med}\approx 5.67
  • i) z=2.5z=2.5
  • j) x=102x=102
  • k) PR=74PR=74
  • l) CV=15%CV=15\%

Three moves carry the whole list: SORT before a median, COUNT the total frequency before dividing, and choose the divisor, n−1n-1 for a sample and nn for a population.

a)
x‾=4.2+5.1+3.8+6.0+4.45=23.55=4.7\displaystyle \overline{x}=\dfrac{4.2+5.1+3.8+6.0+4.4}{5}=\dfrac{23.5}{5}=4.7
b)

Sorted data: 8,9,13,15,17,218, 9, 13, 15, 17, 21. With n=6n=6, the median lies between the 3rd and 4th values:

Med=13+152=14\displaystyle \mathrm{Med}=\dfrac{13+15}{2}=14

Pitfall: taking the middle of the UNSORTED data, here 2121 and 1717.

c)

n=3+7+6+4=20n=3+7+6+4=20 and ∑xini=3+14+18+16=51\sum x_{i}n_{i}=3+14+18+16=51.

x‾=5120=2.55\displaystyle \overline{x}=\dfrac{51}{20}=2.55
d)

The median is the average of the 10th and 11th values. Cumulative frequencies: 33, 1010, 1616, 2020.

The 10th value is 22 and the 11th is 33, so Med=2.5\mathrm{Med}=2.5.

A median is not necessarily a value the variable takes.

e)

x‾=555=11\overline{x}=\dfrac{55}{5}=11; deviations −5-5, −2-2, −1-1, 22, 66; squares 2525, 44, 11, 44, 3636, with sum 7070.

s2=705−1=17.5\displaystyle s^{2}=\dfrac{70}{5-1}=17.5
f)

Population: divide by n=5n=5.

σ=705=14≈3.74\displaystyle \sigma=\sqrt{\dfrac{70}{5}}=\sqrt{14}\approx 3.74

On the same data, the divisor nn always gives a smaller result than the divisor n−1n-1.

g)

Midpoints 22, 66, 1010; n=20n=20.

x‾=2×5+6×12+10×320=11220=5.6\displaystyle \overline{x}=\dfrac{2\times 5+6\times 12+10\times 3}{20}=\dfrac{112}{20}=5.6
h)

n2=10\frac{n}{2}=10. Cumulative frequencies: 55 then 1717: the median class is [4,8)[4, 8), with F=5F=5, nc=12n_{c}=12, w=4w=4.

Med=4+10−512×4≈5.67\displaystyle \mathrm{Med}=4+\dfrac{10-5}{12}\times 4\approx 5.67
i)

z=x−x‾s=68−526.4=2.5z=\dfrac{x-\overline{x}}{s}=\dfrac{68-52}{6.4}=2.5: the value is two and a half standard deviations above the mean.

j)
x=x‾+z s=120+(−1.2)×15=102\displaystyle x=\overline{x}+z\,s=120+(-1.2)\times 15=102
k)

PR=18+12×125×100=74PR=\dfrac{18+\frac{1}{2}\times 1}{25}\times 100=74: about 74%74\% of the data lie below xx.

l)
CV=sx‾×100=640×100=15%\displaystyle CV=\dfrac{s}{\overline{x}}\times 100=\dfrac{6}{40}\times 100=15\%

Tick the exercises you have done or want to review: a free account, no password, keeps your ticks and your right answers from one visit to the next, tells you which chapter to tackle next and lets you ask for the exercise you are missing. Create your space, an email is enough.

Part A: the basics (/50)

Exercise 1: Fine particles: population, sample, variables and tabulated data

14 answers to check

A municipal air-quality monitoring network has 3030 stations. For each station, we record XX, the number of days in January on which the daily mean concentration of fine particles PM2.5\mathrm{PM_{2.5}} exceeded the reference threshold adopted by the network. The data, fictitious, are summarized in the chart below.

The network also records, for each station:(1)the monthly mean concentration of PM2.5\mathrm{PM_{2.5}}, in μg/m3\mu\mathrm{g/m^{3}}(2)the type of setting (residential, industrial, roadside)(3)the air-quality rating for the month (good, acceptable, poor)(4)the number of sensor breakdowns(5)the total duration of the breakdowns, in hours, rounded to the hour.

0246810number of stations012345number of days above the threshold in January
  • a) The network's report covers its 3030 stations. Identify the statistical unit and the variable XX, then say whether the 3030 stations form a population or a sample here.
  • b) A researcher wants to describe the air quality of the whole urban region, at every point. Do the 3030 stations then form a population or a sample? Is the mean of XX computed on them a parameter or a statistic?
  • c) Classify each of the five variables (1) to (5): categorical nominal, categorical ordinal, quantitative discrete or quantitative continuous.
  • d) Using the chart, compute the mean, the median and the mode of XX.
  • e) Compute the percentage of stations that exceeded the threshold on at most two days, then the percentage that exceeded it on at least three days.
  • f) Explain why XX is represented by a bar chart with separated bars, and choose the representation suited to variable (1).

Type your answers, the page tells you right or wrong 0/14

a)
b)
c)
d)
e)
f)
Show the solution

Answers

  • a) Unit: a station of the network; variable XX: number of days above the threshold in January; the 3030 stations form the population
  • b) A sample of the points in the region; its mean is a statistic
  • c) (1) continuous; (2) nominal; (3) ordinal; (4) discrete; (5) continuous
  • d) x‾≈1.73\overline{x}\approx 1.73 days; Med=1.5\mathrm{Med}=1.5 days; mode 11 day
  • e) 73.3%73.3\% at most two days; 26.7%26.7\% at least three days
  • f) Discrete variable, isolated values: separated bars. Variable (1) is continuous: histogram
a)

The statistical unit is the network's STATION; the variable XX is the number of days above the threshold in January, a quantitative discrete variable.

The report is only about these 3030 stations, and all of them are observed: they form the POPULATION under study.

A list of data is neither a population nor a sample by nature: the QUESTION being asked decides.

b)

The researcher is interested in every point in the region, and the stations are only part of it: they now form a SAMPLE.

A measure computed on a sample is a STATISTIC, written x‾\overline{x}; the unknown value for the whole region is the PARAMETER μ\mu.

Caution: these stations were not chosen at random; they are often installed where pollution is a concern. The sample may therefore be biased, and its mean may overestimate the regional mean.

c)

(1) A concentration can take any value in an interval: quantitative CONTINUOUS.

(2) Categories with no order: categorical NOMINAL.

(3) Ordered categories, good before acceptable before poor: categorical ORDINAL.

(4) A count, isolated whole values: quantitative DISCRETE.

(5) A duration is continuous; rounding to the hour is a limit of the recording, not a property of the quantity.

Pitfall: classifying (5) as discrete because the data are whole numbers. Classify the QUANTITY being measured, not the precision of the device.

d)

n=6+9+7+4+3+1=30n=6+9+7+4+3+1=30 and ∑xini=0+9+14+12+12+5=52\sum x_{i}n_{i}=0+9+14+12+12+5=52.

x‾=5230≈1.73\overline{x}=\dfrac{52}{30}\approx 1.73 days

Median: with n=30n=30, the average of the 15th and 16th values. Cumulative frequencies: 66, 1515, 2222; the 15th value is 11, the 16th is 22, so Med=1.5\mathrm{Med}=1.5 days.

Mode: the most frequent value, 11 day (frequency 99).

A mean of 1.731.73 days is not a possible value of XX: this is not an error, it is a summary.

e)

At most two days: 6+9+7=226+9+7=22 stations, that is 2230≈73.3%\dfrac{22}{30}\approx 73.3\%.

At least three days: 4+3+1=84+3+1=8 stations, that is 830≈26.7%\dfrac{8}{30}\approx 26.7\%.

Check: 73.3+26.7=10073.3+26.7=100; the two events are complementary.

f)

XX only takes isolated whole values: each bar stands on ITS value, and nothing exists between two bars. Touching bars would suggest stations with 1.51.5 days.

Concentration (1) is continuous: we group it into classes and represent it with a HISTOGRAM, whose bars touch because the classes follow one another with no gap.

Exercise 2: River flow during a flood: mean, median, mode and skewness

11 answers to check

A hydrometric station records the daily mean flow of a river, in m3/s\mathrm{m^{3}/s}, over 1515 days in April. Rain on snow causes a flood on day 8. The data, fictitious, are in chronological order:

2424; 2222; 2323; 2525; 2727; 2626; 3131; 8888; 6464; 4545; 3737; 3232; 2929; 2828; 2727.

12345678910111213141516102030405060708090100flow (m³/s)
  • a) Compute the mean, the median and the mode of the flows over these 15 days.
  • b) Count the days on which the flow exceeds the mean, and explain why there are so few of them.
  • c) Compare the mean and the median, and deduce the shape of the distribution of the flows.
  • d) Suppose the flood had been smaller, with a flow of 48 on day 8 instead of 88. Recompute the mean and the median, and say which of the two measures resists this change.
  • e) A canoe outfitter wants to know the flow on a usual day of this fortnight; an engineer wants the total volume of water that flowed during the 15 days. Choose the measure that serves each of them, then compute this volume in millions of cubic metres (11 day =86 400=86\,400 s).

Type your answers, the page tells you right or wrong 0/11

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) x‾=35.2 m3/s\overline{x}=35.2\ \mathrm{m^{3}/s}; Med=28 m3/s\mathrm{Med}=28\ \mathrm{m^{3}/s}; mode 27 m3/s27\ \mathrm{m^{3}/s}
  • b) 4 days out of 15: the three flood days pull the mean up
  • c) Mean well above the median: right-skewed, stretched toward high flows
  • d) x‾≈32.53 m3/s\overline{x}\approx 32.53\ \mathrm{m^{3}/s}; Med=28 m3/s\mathrm{Med}=28\ \mathrm{m^{3}/s} unchanged: the median resists
  • e) Usual day: the median; volume: the mean; V≈45.6V\approx 45.6 million m3\mathrm{m^{3}}
a)

∑xi=528\sum x_{i}=528, so x‾=52815=35.2 m3/s\overline{x}=\dfrac{528}{15}=35.2\ \mathrm{m^{3}/s}.

Sorted data: 22,23,24,25,26,27,27,28,29,31,32,37,45,64,8822, 23, 24, 25, 26, 27, 27, \mathbf{28}, 29, 31, 32, 37, 45, 64, 88. With n=15n=15, the median is the 8th value: Med=28 m3/s\mathrm{Med}=28\ \mathrm{m^{3}/s}.

The mode is 27 m3/s27\ \mathrm{m^{3}/s}, the only value that appears twice. For a continuous variable measured finely, the mode of raw data says little: it is better read on classes.

Pitfall: taking the flow on DAY 8, 8888, as the median. The median is read on the sorted data, never in time order.

b)

The flows above 35.235.2 are 8888, 6464, 4545 and 3737: 44 days out of 1515.

The mean shares the total equally among the days. Three flood days alone contribute 88+64+45=19788+64+45=197 of the 528528 units of the total: they pull the mean above almost every other day.

“Half the days are above the mean” is only true for a symmetric distribution: it is the median that splits the data in two.

c)

x‾=35.2>Med=28\overline{x}=35.2>\mathrm{Med}=28: a few very large values stretch the distribution to the right.

The distribution is right-skewed. This is the usual case for flows, precipitation or concentrations: a natural bound on the left, none on the right.

Comparing mean and median is a clue to the shape, not a proof: confirm it on the graph, which here shows a single flood peak.

d)

The total drops by 88−48=4088-48=40: x‾=48815≈32.53 m3/s\overline{x}=\dfrac{488}{15}\approx 32.53\ \mathrm{m^{3}/s}, that is 2.672.67 less.

Sorted data: 4848 replaces 8888 but stays above the 8th value, which is still 2828: Med=28 m3/s\mathrm{Med}=28\ \mathrm{m^{3}/s}.

The median depends only on the RANK of the data: an extreme value can change without moving it. The mean depends on every value: it is sensitive to extreme values.

e)

The outfitter wants a TYPICAL day: the median, 28 m3/s28\ \mathrm{m^{3}/s}, says that on one day out of two the flow was at most 2828.

The engineer wants a TOTAL: the volume is the sum of the daily flows multiplied by the length of a day, so n x‾×86 400n\,\overline{x}\times 86\,400.

V=528×86 400≈4.56×107 m3V=528\times 86\,400\approx 4.56\times 10^{7}\ \mathrm{m^{3}}, about 45.645.6 million cubic metres.

No measure is the best in absolute terms: the question asked, together with the shape of the distribution, makes the choice.

12345678910111213141516102030405060708090100mean: 35.2median: 28flow (m³/s)

Exercise 3: Temperature of a lake: variance, standard deviation and the computing formula proved

8 answers to check

One August morning, a team measures the surface water temperature at 88 points along a transect across a lake. The readings, in degrees Celsius, are fictitious:

21.421.4; 22.022.0; 20.620.6; 23.123.1; 21.821.8; 22.522.5; 20.920.9; 21.721.7.

These 88 points are a sample of all the points on the surface of the lake.

2020.52121.52222.52323.524temperature (°C)
  • a) Compute the mean x‾\overline{x}, then draw up the table of deviations xi−x‾x_{i}-\overline{x} and compute their sum.
  • b) Prove that, for any set of nn data values, ∑i=1n(xi−x‾)=0\displaystyle\sum_{i=1}^{n}(x_{i}-\overline{x})=0. Explain why the mean of the deviations therefore cannot measure dispersion.
  • c) Compute the variance s2s^{2} and the standard deviation ss of the sample, with their units.
  • d) Prove that ∑i=1n(xi−x‾)2=∑i=1nxi2−n x‾2\displaystyle\sum_{i=1}^{n}(x_{i}-\overline{x})^{2}=\sum_{i=1}^{n}x_{i}^{2}-n\,\overline{x}^{2}. Compute ∑xi2\sum x_{i}^{2} and check the formula on these data. Then compute what the right-hand side gives if x‾\overline{x} is first rounded to 21.821.8.
  • e) Compute the standard deviation obtained by dividing by nn instead of n−1n-1, and say which of the two should appear in the report.

Type your answers, the page tells you right or wrong 0/8

a)
c)
d)
e)
Show the solution

Answers

  • a) x‾=21.75 ∘C\overline{x}=21.75\ ^{\circ}\mathrm{C}; the sum of the deviations is 00
  • b) ∑(xi−x‾)=∑xi−nx‾=0\sum(x_{i}-\overline{x})=\sum x_{i}-n\overline{x}=0: positive and negative deviations always cancel out
  • c) s2=0.66 (∘C)2s^{2}=0.66\ (^{\circ}\mathrm{C})^{2}; s≈0.81 ∘Cs\approx 0.81\ ^{\circ}\mathrm{C}
  • d) ∑xi2=3789.12\sum x_{i}^{2}=3789.12; 3789.12−3784.5=4.623789.12-3784.5=4.62; with x‾≈21.8\overline{x}\approx 21.8: −12.8-12.8, impossible
  • e) ≈0.76 ∘C\approx 0.76\ ^{\circ}\mathrm{C}; report s≈0.81 ∘Cs\approx 0.81\ ^{\circ}\mathrm{C} (sample)
a)

∑xi=174.0\sum x_{i}=174.0, so x‾=174.08=21.75 ∘C\overline{x}=\dfrac{174.0}{8}=21.75\ ^{\circ}\mathrm{C}.

Deviations, in the order of the readings: −0.35-0.35; 0.250.25; −1.15-1.15; 1.351.35; 0.050.05; 0.750.75; −0.85-0.85; −0.05-0.05.

Sum of the positive deviations: 2.402.40; sum of the negative deviations: −2.40-2.40; total: 00.

The figure in the solution draws each deviation from the mean: the blue segments on the right exactly balance the orange segments on the left.

b)

Split the sum, then use ∑xi=n x‾\sum x_{i}=n\,\overline{x}, which is the definition of the mean:

∑i=1n(xi−x‾)=∑i=1nxi−n x‾=n x‾−n x‾=0\begin{aligned}\sum_{i=1}^{n}(x_{i}-\overline{x}) &= \sum_{i=1}^{n}x_{i}-n\,\overline{x} \\ &= n\,\overline{x}-n\,\overline{x}=0\end{aligned}

The mean of the deviations is therefore 00 for EVERY data set, widely spread or not: it distinguishes nothing. We remove the signs by squaring the deviations, which gives the variance.

c)

Squared deviations: 0.12250.1225; 0.06250.0625; 1.32251.3225; 1.82251.8225; 0.00250.0025; 0.56250.5625; 0.72250.7225; 0.00250.0025, with sum 4.624.62.

s2=4.628−1=0.66 (∘C)2s^{2}=\dfrac{4.62}{8-1}=0.66\ (^{\circ}\mathrm{C})^{2} and s=0.66≈0.81 ∘Cs=\sqrt{0.66}\approx 0.81\ ^{\circ}\mathrm{C}

The variance is in degrees SQUARED, a unit with no direct physical meaning; the standard deviation is back in the unit of the data, and it is the one we interpret.

Reading: the temperatures along the transect deviate from the mean by about 0.8 ∘C0.8\ ^{\circ}\mathrm{C} as an order of magnitude.

d)

Expand the square, then split the three sums:

∑(xi−x‾)2=∑xi2−2x‾∑xi+nx‾2=∑xi2−2nx‾2+nx‾2=∑xi2−nx‾2\begin{aligned}\sum(x_{i}-\overline{x})^{2} &= \sum x_{i}^{2}-2\overline{x}\sum x_{i}+n\overline{x}^{2} \\ &= \sum x_{i}^{2}-2n\overline{x}^{2}+n\overline{x}^{2} \\ &= \sum x_{i}^{2}-n\overline{x}^{2}\end{aligned}

Here ∑xi2=3789.12\sum x_{i}^{2}=3789.12 and nx‾2=8×21.752=3784.5n\overline{x}^{2}=8\times 21.75^{2}=3784.5: the difference is 4.624.62, as in c).

With x‾\overline{x} rounded to 21.821.8: 3789.12−8×21.82=3789.12−3801.92=−12.83789.12-8\times 21.8^{2}=3789.12-3801.92=-12.8.

Pitfall: a negative sum of squares is impossible. The formula subtracts two large, nearly equal numbers: rounding the mean by 0.050.05 is enough to ruin everything. Keep the exact mean, or use the calculator's memory.

e)

Divisor nn: 4.628=0.5775≈0.76 ∘C\sqrt{\dfrac{4.62}{8}}=\sqrt{0.5775}\approx 0.76\ ^{\circ}\mathrm{C}.

The 88 points are a SAMPLE of the lake: report s≈0.81 ∘Cs\approx 0.81\ ^{\circ}\mathrm{C}, with divisor n−1n-1. The deviations are measured around x‾\overline{x}, which is closer to the data than the true mean μ\mu of the lake: dividing by nn would underestimate the dispersion on average. Exercise 7 proves it.

On calculators, ss is often labelled sxs_{x} or σn−1\sigma_{n-1}, and the other one σx\sigma_{x} or σn\sigma_{n}: read the key before copying the result.

2020.52121.52222.52323.524−1.15−0.85−0.35−0.05+0.05+0.25+0.75+1.35mean 21.75

Exercise 4: Length of trout: z-score, percentile rank and comparing two lakes

9 answers to check

During a survey, a team of biologists catches 2525 brook trout in a lake A and measures their total length, in centimetres. The data, fictitious, are sorted below; the histogram groups them into classes of 22 cm:

17.817.8; 19.019.0; 19.619.6; 20.320.3; 20.920.9; 21.221.2; 21.821.8; 22.422.4; 22.722.7; 23.123.1; 23.623.6; 24.024.0; 24.324.3; 24.824.8; 25.225.2; 25.525.5; 26.126.1; 26.626.6; 27.327.3; 27.927.9; 28.428.4; 29.229.2; 30.130.1; 31.531.5; 35.035.0.

We are given ∑xi=618.3\sum x_{i}=618.3 and ∑xi2=15 704.95\sum x_{i}^{2}=15\,704.95. Percentile rank: PR(x)=N<+12N=n×100PR(x)=\dfrac{N_{<}+\frac{1}{2}N_{=}}{n}\times 100.

161820222426283032343612345678length (cm)number of trout
  • a) Compute the mean x‾\overline{x} and the standard deviation ss of the sample using the two given sums.
  • b) Compute the z-score of the longest trout, 35.035.0 cm, then that of the shortest, 17.817.8 cm.
  • c) Compute the percentile rank of the 27.327.3 cm trout, then interpret it in one sentence.
  • d) In a nearby lake B, the trout in the survey have a mean of 33.433.4 cm and a standard deviation of 3.03.0 cm. One trout there measures 31.031.0 cm. Compute its z-score, then say which is larger RELATIVE to its own lake: this trout or the 27.327.3 cm trout from lake A.
  • e) The biologists classify as “small” any trout in lake A whose z-score is below −1.5-1.5. Compute the length corresponding to z=−1.5z=-1.5.
  • f) Is the 35.035.0 cm trout exceptional? Base your answer on its z-score, then on the 1.51.5 times the interquartile range rule (Q1Q_{1} and Q3Q_{3} are the medians of the 1212 smallest and the 1212 largest values).

Type your answers, the page tells you right or wrong 0/9

a)
b)
c)
d)
e)
f)
Show the solution

Answers

  • a) x‾≈24.73\overline{x}\approx 24.73 cm; s≈4.15s\approx 4.15 cm
  • b) z≈2.47z\approx 2.47 for 35.035.0 cm; z≈−1.67z\approx -1.67 for 17.817.8 cm
  • c) PR=74PR=74: about 74%74\% of the trout caught are shorter
  • d) zB=−0.80z_{B}=-0.80 against zA≈0.62z_{A}\approx 0.62: the 27.327.3 cm trout from lake A is relatively the larger
  • e) x≈18.5x\approx 18.5 cm
  • f) Unusual (z≈2.47z\approx 2.47) but not an outlier: 35.0<Q3+1.5 IQR=36.7535.0<Q_{3}+1.5\,IQR=36.75
a)

x‾=618.325=24.732≈24.73\overline{x}=\dfrac{618.3}{25}=24.732\approx 24.73 cm.

With the formula proved in exercise 3:

s2=∑xi2−nx‾2n−1=15 704.95−25×24.732224≈17.21\displaystyle s^{2}=\dfrac{\sum x_{i}^{2}-n\overline{x}^{2}}{n-1}=\dfrac{15\,704.95-25\times 24.732^{2}}{24}\approx 17.21

s≈4.15s\approx 4.15 cm

b)

z=x−x‾sz=\dfrac{x-\overline{x}}{s}: the deviation from the mean counted in standard deviations.

z35.0=35.0−24.734.15≈2.47z_{35.0}=\dfrac{35.0-24.73}{4.15}\approx 2.47 and z17.8=17.8−24.734.15≈−1.67z_{17.8}=\dfrac{17.8-24.73}{4.15}\approx -1.67.

The longest trout is almost two and a half standard deviations above the mean; the shortest a little more than one and a half standard deviations below. The distribution is not symmetric: the right tail is longer.

The histogram in the solution carries the z-score scale: each dashed line is one standard deviation from the next.

c)

The 27.327.3 cm trout is the 19th in the sorted data: N<=18N_{<}=18 and N==1N_{=}=1.

PR=18+1225×100=74\displaystyle PR=\dfrac{18+\frac{1}{2}}{25}\times 100=74

About 74%74\% of the trout caught in lake A are shorter than this one. The percentile rank is a POSITION within the group, not a percentage of length.

d)

zB=31.0−33.43.0=−0.80z_{B}=\dfrac{31.0-33.4}{3.0}=-0.80; for the 27.327.3 cm trout from lake A, zA=27.3−24.734.15≈0.62z_{A}=\dfrac{27.3-24.73}{4.15}\approx 0.62.

The lake B trout is longer in centimetres, but it is BELOW the mean of its lake; the lake A trout is above the mean of its own.

Relative to its lake, the 27.327.3 cm trout is the larger.

Pitfall: comparing centimetres. Two populations with different means and standard deviations can only be compared through z-scores; the z-score does not, however, explain WHY the trout in lake B are larger (food, age, temperature).

e)

Solve z=x−x‾sz=\dfrac{x-\overline{x}}{s} for xx: x=x‾+z sx=\overline{x}+z\,s.

x=24.732−1.5×4.149≈18.5x=24.732-1.5\times 4.149\approx 18.5 cm

Only one trout caught, the 17.817.8 cm one, is “small” by this criterion.

f)

z≈2.47z\approx 2.47: the trout lies beyond two standard deviations. For a bell-shaped distribution, this happens to only a few percent of individuals: it is UNUSUAL. This reading assumes a roughly bell-shaped distribution; it does not hold for just any distribution.

Interquartile range rule: Q1=21.2+21.82=21.5Q_{1}=\dfrac{21.2+21.8}{2}=21.5 and Q3=27.3+27.92=27.6Q_{3}=\dfrac{27.3+27.9}{2}=27.6, so IQR=6.1IQR=6.1.

Upper fence: 27.6+1.5×6.1=36.7527.6+1.5\times 6.1=36.75 cm. Since 35.0<36.7535.0<36.75, the trout is NOT an outlier by this rule.

Unusual does not mean outlier, and outlier would not mean erroneous: a large, old trout is a real individual of the lake.

161820222426283032343612345678length (cm)z = −2z = −1z = 0z = 1z = 217.835.027.3number of trout

Exercise 5: Ice thickness: quartiles, box plot and a safety decision

13 answers to check

Before opening a skating trail on two lakes, a municipal team drills holes and measures the thickness of the ice, in centimetres. On lake A, 1616 fictitious measurements, sorted:

99; 1919; 2121; 2222; 2323; 2424; 2424; 2525; 2626; 2626; 2727; 2828; 2929; 3030; 3131; 3333. The 99 cm measurement was taken near the mouth of a stream.

Lake B is summarized by the box plot below: minimum 1616, Q1=20Q_{1}=20, median 2323, Q3=25Q_{3}=25, maximum 2727.

Convention: Q1Q_{1} and Q3Q_{3} are the medians of the lower half and of the upper half of the sorted data. Rule for this exercise, fictitious: a trail opens only if NO measured point has less than 1515 cm of ice.

510152025303540lake B15 cmice thickness (cm)
  • a) Determine Q1Q_{1}, the median and Q3Q_{3} of the thicknesses on lake A.
  • b) Compute the interquartile range IQRIQR and the fences Q1−1.5 IQRQ_{1}-1.5\,IQR and Q3+1.5 IQRQ_{3}+1.5\,IQR, then identify the outliers of lake A.
  • c) Draw the box plot of lake A on the same axis as that of lake B. State where its left whisker ends.
  • d) Compare the two lakes: which has the higher median, and which has the more spread-out thicknesses in terms of the interquartile range?
  • e) Apply the opening rule to each of the two lakes, and explain why neither the mean nor the median is useful here.
  • f) A councillor suggests removing the 9 cm measurement from the report, “since it is an outlier”. Say whether she is right.

Type your answers, the page tells you right or wrong 0/13

a)
b)
c)
d)
e)
f)
Show the solution

Answers

  • a) Q1=22.5Q_{1}=22.5 cm; Med=25.5\mathrm{Med}=25.5 cm; Q3=28.5Q_{3}=28.5 cm
  • b) IQR=6IQR=6 cm; fences 13.513.5 and 37.537.5 cm; one outlier: 99 cm
  • c) Box from 22.522.5 to 28.528.5, median 25.525.5; whiskers from 1919 to 3333; isolated point at 99
  • d) Lake A: median 25.5>2325.5>23 and IQR=6>5IQR=6>5
  • e) Lake A closed (minimum 9<159<15); lake B open (minimum 16≥1516\geq 15): the MINIMUM decides
  • f) No: an outlier is not an error; this measurement flags a dangerous zone
a)

n=16n=16 is even: the median is the average of the 8th and 9th values, Med=25+262=25.5\mathrm{Med}=\dfrac{25+26}{2}=25.5 cm.

Lower half: 9,19,21,22,23,24,24,259, 19, 21, 22, 23, 24, 24, 25, with median Q1=22+232=22.5Q_{1}=\dfrac{22+23}{2}=22.5 cm.

Upper half: 26,26,27,28,29,30,31,3326, 26, 27, 28, 29, 30, 31, 33, with median Q3=28+292=28.5Q_{3}=\dfrac{28+29}{2}=28.5 cm.

Other conventions (software, position (n+1)/4(n+1)/4) give slightly different quartiles: state the one you follow.

b)

IQR=Q3−Q1=28.5−22.5=6IQR=Q_{3}-Q_{1}=28.5-22.5=6 cm.

Q1−1.5 IQR=22.5−9=13.5Q_{1}-1.5\,IQR=22.5-9=13.5 cm and Q3+1.5 IQR=28.5+9=37.5Q_{3}+1.5\,IQR=28.5+9=37.5 cm.

Only the 99 cm measurement lies outside these fences: it is the only outlier by the rule.

c)

The box runs from Q1=22.5Q_{1}=22.5 to Q3=28.5Q_{3}=28.5, split by the median 25.525.5.

The right whisker runs to the maximum, 3333 cm, which is below 37.537.5.

The left whisker stops at 1919 cm, the smallest value that is not an outlier; the 99 cm measurement is an isolated point.

Pitfall: drawing the whisker all the way to 99. The box plot would then suggest an even spread from 99 to 3333, and the dangerous point would vanish into the line.

d)

Medians: 25.525.5 cm for A against 2323 cm for B. Interquartile ranges: 66 cm for A against 25−20=525-20=5 cm for B.

In the middle, the ice on lake A is thicker; it is also a little more irregular. Its mean, 24.8124.81 cm, also exceeds the median of B.

e)

Lake A: one measurement is 99 cm, below 1515 cm: the trail does not open. Lake B: the minimum is 1616 cm: the trail opens.

The rule concerns the weakest point, not a typical point: nobody skates on the mean. Lake A, the better one “on average”, is the only one closed.

For a safety question, it is the extreme of the distribution, here the minimum, that decides.

f)

No. “Outlier” is a criterion of position, not a verdict of error: the measurement has a known physical cause, the stream's current thinning the ice.

A value is removed only if a measurement or data-entry error is proved. Here, removing it would erase the one piece of information that decides safety.

510152025303540lake Blake A15 cmice thickness (cm)9

Part B: problems and reasoning (/50)

Exercise 6: Mass of turtle eggs: data grouped into classes, interpolation and percentiles

9 answers to check

On a nesting beach, biologists weigh 120120 snapping turtle eggs and group the masses, in grams, into classes of width 11 g. The data are fictitious.

The median and the percentiles are computed by linear interpolation within their class: the kkth percentile is Pk=L+k100n−Fnc×wP_{k}=L+\dfrac{\frac{k}{100}n-F}{n_{c}}\times w, with the notation of exercise 0.1.

Mass (g)[8, 9)[9, 10)[10, 11)[11, 12)[12, 13)[13, 14)
Number of eggs6153138219
789101112131415510152025303540mass (g)number of eggs
  • a) State the type of the variable studied and say why it is grouped into classes. Compute the percentage of eggs under 10 g.
  • b) Compute the mean mass x‾\overline{x} using the class midpoints.
  • c) Compute the standard deviation ss using the class midpoints, treating the 120120 eggs as a sample.
  • d) Give the modal class, then compute the median by interpolation.
  • e) Compute the 90th percentile P90P_{90}, then the percentile rank of a 10.510.5 g egg, assuming the eggs are spread evenly within their class.
  • f) On the 120120 raw masses, the exact mean is 11.1911.19 g. Explain the gap with the result of b), then compare the mean and the median to describe the shape of the distribution.

Type your answers, the page tells you right or wrong 0/9

a)
b)
c)
d)
e)
f)
Show the solution

Answers

  • a) Quantitative continuous; 17.5%17.5\% of the eggs weigh less than 1010 g
  • b) x‾≈11.17\overline{x}\approx 11.17 g
  • c) s≈1.26s\approx 1.26 g
  • d) Modal class [11,12)[11, 12); Med≈11.21\mathrm{Med}\approx 11.21 g
  • e) P90≈12.86P_{90}\approx 12.86 g; percentile rank of 10.510.5 g: about 3030
  • f) The midpoints replace the true masses; x‾<Med\overline{x}<\mathrm{Med}: slight skew toward small masses
a)

A mass can take any value in an interval: the variable is quantitative CONTINUOUS. With 120 values that are almost all different, a value-by-value table summarizes nothing: we condense into classes, at the cost of the individual values.

Under 1010 g: 6+15=216+15=21 eggs, that is 21120=17.5%\dfrac{21}{120}=17.5\%.

b)

Midpoints: 8.58.5; 9.59.5; 10.510.5; 11.511.5; 12.512.5; 13.513.5. Each midpoint is weighted by the frequency of its class:

∑cini=51+142.5+325.5+437+262.5+121.5=1340\displaystyle \sum c_{i}n_{i}=51+142.5+325.5+437+262.5+121.5=1340

x‾=1340120≈11.17\overline{x}=\dfrac{1340}{120}\approx 11.17 g

Pitfall: averaging the six midpoints, 1111 g, as if each class contained the same number of eggs.

c)

∑ci2ni=15 152\sum c_{i}^{2}n_{i}=15\,152. Using the computing formula from exercise 3, weighted:

s2=∑ci2ni−nx‾2n−1=15 152−120×11.16‾2119≈1.585\displaystyle s^{2}=\dfrac{\sum c_{i}^{2}n_{i}-n\overline{x}^{2}}{n-1}=\dfrac{15\,152-120\times 11.1\overline{6}^{2}}{119}\approx 1.585

s≈1.26s\approx 1.26 g

Order of magnitude: for a roughly bell-shaped distribution like this one, about two thirds of the eggs weigh between x‾−s≈9.9\overline{x}-s\approx 9.9 g and x‾+s≈12.4\overline{x}+s\approx 12.4 g; the histogram is consistent with this reading.

d)

The modal class is the one with the highest frequency: [11,12)[11, 12), with 3838 eggs. With classes of equal width, it is also the tallest bar.

Median: n2=60\frac{n}{2}=60. Cumulative frequencies: 66, 2121, 5252, 9090: the 60th value is in [11,12)[11, 12), with F=52F=52 and nc=38n_{c}=38.

Med=11+60−5238×1≈11.21\mathrm{Med}=11+\dfrac{60-52}{38}\times 1\approx 11.21 g

e)

P90P_{90}: 0.90×120=1080.90\times 120=108; 9090 eggs come before the class [12,13)[12, 13), which contains 2121.

P90=12+108−9021×1≈12.86P_{90}=12+\dfrac{108-90}{21}\times 1\approx 12.86 g: about 90%90\% of the eggs weigh less.

Percentile rank of 10.510.5 g: 2121 eggs in the earlier classes, plus half of the 3131 eggs in [10,11)[10, 11) if these are spread evenly.

PR≈21+15.5120×100≈30.4PR\approx\dfrac{21+15.5}{120}\times 100\approx 30.4, that is about 3030.

The ogive in the solution shows both readings: enter on the percentage axis for a percentile, on the mass axis for a percentile rank.

f)

The midpoints replace each mass with the middle of its class: we assume the eggs are spread evenly within each class. The gap 11.19−11.17=0.0211.19-11.17=0.02 g measures the cost of this assumption, small here because the classes are narrow.

x‾≈11.17<Med≈11.21\overline{x}\approx 11.17<\mathrm{Med}\approx 11.21: the distribution is slightly stretched toward small masses, as shown by the classes [8,9)[8, 9) and [9,10)[9, 10), which hold more eggs than [13,14)[13, 14).

Such a small gap between mean and median signals a slight skew; on its own, it is not enough to prove it.

891011121314102030405060708090100median ≈ 11.21P90 ≈ 12.86cumulative %

Exercise 7: Proofs: the mean minimizes the squared deviations, and why we divide by n minus 1

7 answers to check

Let x1,…,xnx_{1},\dots,x_{n} be a data set with mean x‾\overline{x}. For every real number cc, we study the sum of the squared deviations from cc: f(c)=∑i=1n(xi−c)2f(c)=\displaystyle\sum_{i=1}^{n}(x_{i}-c)^{2}.

In the second part, a tiny population serves as a laboratory: during a storm, the three rain gauges of a small network collected 22, 66 and 1010 mm of rain. Samples of size n=2n=2 are drawn at random from it, WITH replacement.

  • a) Compute f′(c)f'(c), then prove that ff reaches its minimum at c=x‾c=\overline{x}, and only there.
  • b) Prove that f(c)=∑i=1n(xi−x‾)2+n(x‾−c)2f(c)=\displaystyle\sum_{i=1}^{n}(x_{i}-\overline{x})^{2}+n(\overline{x}-c)^{2}. Apply this identity to the temperatures of exercise 3 (n=8n=8, x‾=21.75\overline{x}=21.75, ∑(xi−x‾)2=4.62\sum(x_{i}-\overline{x})^{2}=4.62) to compute f(22)f(22).
  • c) Let μ\mu be the true mean of the population the sample comes from. Deduce from b) the direction of the error made when dispersion is measured by deviations from x‾\overline{x} instead of deviations from μ\mu.
  • d) Compute the mean μ\mu and the variance σ2\sigma^{2} (divisor N=3N=3) of the population of three rain gauges.
  • e) List the 99 ordered samples of size 22 drawn with replacement. For each one, compute s2s^{2} (divisor n−1=1n-1=1) and the variance with divisor n=2n=2, then compute the mean of each of the two over the 99 samples.
  • f) Conclude: which of the two divisors gives, on average, the variance of the population?

Type your answers, the page tells you right or wrong 0/7

b)
c)
d)
e)
f)
Show the solution

Answers

  • a) f′(c)=−2∑(xi−c)=2n(c−x‾)f'(c)=-2\sum(x_{i}-c)=2n(c-\overline{x}), zero only at x‾\overline{x}; f′′=2n>0f''=2n>0: minimum
  • b) Identity proved; f(22)=4.62+8×0.252=5.12f(22)=4.62+8\times 0.25^{2}=5.12
  • c) ∑(xi−x‾)2≤∑(xi−μ)2\sum(x_{i}-\overline{x})^{2}\leq\sum(x_{i}-\mu)^{2}: deviations from x‾\overline{x} underestimate the dispersion
  • d) μ=6\mu=6 mm; σ2=323≈10.67 mm2\sigma^{2}=\frac{32}{3}\approx 10.67\ \mathrm{mm^{2}}
  • e) Mean of the s2s^{2}: 969≈10.67\frac{96}{9}\approx 10.67; divisor nn: 489≈5.33\frac{48}{9}\approx 5.33
  • f) The divisor n−1n-1: on average s2=σ2s^{2}=\sigma^{2}; the divisor nn gives n−1nσ2\frac{n-1}{n}\sigma^{2}
a)

ff is a polynomial of degree 22 in cc. Differentiate term by term:

f′(c)=∑i=1n−2(xi−c)=−2(∑xi−nc)=2n(c−x‾)\begin{aligned}f'(c) &= \sum_{i=1}^{n}-2(x_{i}-c) \\ &= -2\Big(\sum x_{i}-nc\Big)=2n(c-\overline{x})\end{aligned}

f′(c)=0f'(c)=0 if and only if c=x‾c=\overline{x}; f′f' is negative before, positive after, and f′′(c)=2n>0f''(c)=2n>0.

So ff has a global minimum at c=x‾c=\overline{x}, and only at that point: no other value is closer to the data in the least-squares sense.

b)

Write xi−c=(xi−x‾)+(x‾−c)x_{i}-c=(x_{i}-\overline{x})+(\overline{x}-c) and expand the square:

f(c)=∑(xi−x‾)2+2(x‾−c)∑(xi−x‾)+n(x‾−c)2\displaystyle f(c)=\sum(x_{i}-\overline{x})^{2}+2(\overline{x}-c)\sum(x_{i}-\overline{x})+n(\overline{x}-c)^{2}

The middle term is zero, because ∑(xi−x‾)=0\sum(x_{i}-\overline{x})=0 (exercise 3). Hence the identity.

Lake temperatures: f(22)=4.62+8×(21.75−22)2=4.62+0.5=5.12f(22)=4.62+8\times(21.75-22)^{2}=4.62+0.5=5.12.

This confirms a): the term n(x‾−c)2n(\overline{x}-c)^{2} is positive, except at c=x‾c=\overline{x}.

c)

With c=μc=\mu: ∑(xi−μ)2=∑(xi−x‾)2+n(x‾−μ)2≥∑(xi−x‾)2\sum(x_{i}-\mu)^{2}=\sum(x_{i}-\overline{x})^{2}+n(\overline{x}-\mu)^{2}\geq\sum(x_{i}-\overline{x})^{2}.

The sample does not know μ\mu and measures its deviations around x‾\overline{x}, the point closest to ITS OWN data. The resulting sum of squares is in general too small, by n(x‾−μ)2n(\overline{x}-\mu)^{2}.

Dividing this sum by nn therefore underestimates the dispersion of the population; dividing by n−1n-1, a smaller number, compensates.

d)

μ=2+6+103=6\mu=\dfrac{2+6+10}{3}=6 mm.

σ2=(2−6)2+(6−6)2+(10−6)23=323≈10.67 mm2\displaystyle \sigma^{2}=\dfrac{(2-6)^{2}+(6-6)^{2}+(10-6)^{2}}{3}=\dfrac{32}{3}\approx 10.67\ \mathrm{mm^{2}}
e)

The 99 samples: (2,2)(2, 2), (2,6)(2, 6), (2,10)(2, 10), (6,2)(6, 2), (6,6)(6, 6), (6,10)(6, 10), (10,2)(10, 2), (10,6)(10, 6), (10,10)(10, 10), all equally likely.

For two data values aa, bb with mean a+b2\frac{a+b}{2}, the sum of squared deviations is (a−b)22\frac{(a-b)^{2}}{2}, so s2=(a−b)22s^{2}=\frac{(a-b)^{2}}{2} and the version with divisor 22 is (a−b)24\frac{(a-b)^{2}}{4}.

Values of s2s^{2}: 00; 88; 3232; 88; 00; 88; 3232; 88; 00, with sum 9696 and mean 969=323≈10.67\frac{96}{9}=\frac{32}{3}\approx 10.67.

Values with divisor 22: half as large, with mean 489≈5.33\frac{48}{9}\approx 5.33.

The chart in the solution shows the nine values of s2s^{2}: none of them equals σ2\sigma^{2}, but their mean lands exactly on it.

f)

The mean of the s2s^{2} equals σ2\sigma^{2}: over all possible samples, the divisor n−1n-1 is right on average. We say that s2s^{2} is an UNBIASED estimator of σ2\sigma^{2}; the course on inference proves it in general for sampling with replacement.

The divisor nn gives on average n−1nσ2\frac{n-1}{n}\sigma^{2}, here half; for the 88 points of the lake, it would lose 18\frac{1}{8} of the variance on average.

A nuance: it is s2s^{2} that is unbiased, not ss. The square root slightly distorts the average, and ss slightly underestimates σ\sigma for small samples.

20.52121.52222.52324681012141618f(c)minimum (21.75, 4.62)
The sum f(c)f(c) for the lake temperatures: a parabola whose minimum, 4.624.62, is reached at c=x‾=21.75c=\overline{x}=21.75.
123456789104812162024283236mean 10.67sample s²
The s2s^{2} of the 99 samples of size 22: none equals σ2\sigma^{2}, but their mean, 10.6710.67, is exactly σ2\sigma^{2}.

Exercise 8: Five statements to correct

5 answers to check

Each of the following five statements is FALSE. Explain why, then choose the correct statement. Two points per statement.

  • a) “Fine-particle readings are rounded to the nearest μg/m3\mu\mathrm{g/m^{3}}: concentration is therefore a discrete variable.”
  • b) “If the temperatures of a lake are converted from degrees Celsius to kelvins, by adding 273.15273.15 to each reading, the standard deviation increases by 273.15273.15.”
  • c) “A trout whose z-score is 22 is twice as long as the mean of its lake.”
  • d) “In a histogram, the height of each bar is the frequency of its class.”
  • e) “An ice thickness with percentile rank 9090 reaches 90%90\% of the largest thickness measured.”

Type your answers, the page tells you right or wrong 0/5

a)
b)
c)
d)
e)
Show the solution

Answers

  • a) Continuous: the rounding belongs to the instrument; the quantity varies continuously
  • b) ss unchanged; only the mean increases by 273.15273.15
  • c) z=2z=2: two standard deviations above the mean, not double
  • d) The area is proportional to the frequency; height = density if the widths differ
  • e) About 90%90\% of the measurements are thinner: it is a position, not a proportion of the maximum
a)

A concentration can take any value in an interval; rounding to the microgram is a limit of the device and of the display, not a property of the quantity.

Correction: concentration is a quantitative CONTINUOUS variable, recorded to the nearest microgram per cubic metre.

Pitfall: classifying a variable from the look of the numbers in the table. A mass rounded to the gram is still a mass.

b)

Adding a constant bb to all the data shifts the mean by bb and leaves each deviation xi−x‾x_{i}-\overline{x} unchanged: the standard deviation does not move.

One-line proof: yi−y‾=(xi+b)−(x‾+b)=xi−x‾y_{i}-\overline{y}=(x_{i}+b)-(\overline{x}+b)=x_{i}-\overline{x}.

Correction: in kelvins, the mean increases by 273.15273.15 and the standard deviation stays the same, in kelvins or in degrees Celsius, since a difference of 11 K equals a difference of 1 ∘C1\ ^{\circ}\mathrm{C}.

c)

The z-score counts the deviation from the mean in standard deviations: x=x‾+z sx=\overline{x}+z\,s. With z=2z=2, the trout measures x‾+2s\overline{x}+2s, not 2x‾2\overline{x}.

Example from lake A in exercise 4: 24.73+2×4.15≈33.024.73+2\times 4.15\approx 33.0 cm, far from 2×24.73≈49.52\times 24.73\approx 49.5 cm.

Correction: a trout with z-score z=2z=2 exceeds the mean of its lake by two standard deviations.

d)

True only when all the classes have the same width. As soon as the widths differ, the eye reads the AREAS: a class twice as wide with the same height looks twice as populated.

Correction: the area of each bar is proportional to the frequency; the height is the density niwi\dfrac{n_{i}}{w_{i}}, frequency per unit of the variable. Exercise 10 shows it with precipitation.

Pitfall: drawing unequal classes with the frequencies as heights. The rare large values, grouped in a wide class, take over the figure.

e)

The percentile rank is a POSITION within the group: the proportion of measurements lying below. It does not compare the value with the maximum.

Example: on lake A in exercise 5, the 3030 cm measurement has percentile rank 13+0.516×100≈84\dfrac{13+0.5}{16}\times 100\approx 84, and equals 3033≈91%\dfrac{30}{33}\approx 91\% of the maximum: two unrelated numbers.

Correction: an ice thickness with percentile rank 9090 is greater than about 90%90\% of the thicknesses measured.

Exercise 9: Problem: nitrates in private wells, a complete study

14 answers to check

A regional agency analyzes the water of 2020 private wells drawn at random from the registered wells of a farming area. Each result is the nitrate concentration expressed as nitrogen, in mg/L. The data, fictitious, are sorted:

0.80.8; 1.21.2; 1.51.5; 2.12.1; 2.42.4; 2.92.9; 3.33.3; 3.63.6; 4.04.0; 4.44.4; 4.84.8; 5.35.3; 5.95.9; 6.56.5; 7.27.2; 8.18.1; 9.49.4; 10.610.6; 12.312.3; 15.915.9. We are given ∑xi=112.2\sum x_{i}=112.2 and ∑xi2=932.58\sum x_{i}^{2}=932.58.

Guideline: the Canadian drinking water guideline sets a maximum acceptable concentration of 4545 mg/L of nitrate, about 1010 mg/L expressed as nitrogen. To convert from nitrogen to the nitrate ion, multiply by 4.434.43, the ratio of the molar masses of NO3−\mathrm{NO_{3}^{-}} and N\mathrm{N}.

24681012141618123456guideline: 10 mg/Lnitrate-nitrogen(mg/L)number of wells
  • a) Identify the population, the sample and the variable of the study.
  • b) Compute the mean, the median and the standard deviation ss of the concentrations.
  • c) Compute the percentage of wells in the sample that exceed 10 mg/L. Explain why the mean alone cannot answer this question.
  • d) Compute Q1Q_{1}, Q3Q_{3} and the fence Q3+1.5 IQRQ_{3}+1.5\,IQR (medians of the two halves), then the z-score of the well at 15.915.9 mg/L. Is this well an outlier by the rule?
  • e) Prove that if yi=a xi+by_{i}=a\,x_{i}+b for every ii, then y‾=a x‾+b\overline{y}=a\,\overline{x}+b and sy=∣a∣ sxs_{y}=|a|\,s_{x}. Deduce the mean and the standard deviation of the concentrations expressed as nitrate ion, and say whether the z-score of a well changes.
  • f) Choose the conclusion suited to the agency's report.

Type your answers, the page tells you right or wrong 0/14

a)
b)
c)
d)
e)
f)
Show the solution

Answers

  • a) Population: the registered private wells of the area; sample: the 20 wells drawn; variable: the nitrate concentration as nitrogen (continuous)
  • b) x‾=5.61\overline{x}=5.61 mg/L; Med=4.6\mathrm{Med}=4.6 mg/L; s≈3.99s\approx 3.99 mg/L
  • c) 15%15\% (3 wells out of 20); a mean below the guideline does not rule out exceedances
  • d) Q1=2.65Q_{1}=2.65; Q3=7.65Q_{3}=7.65; fence 15.1515.15; z≈2.58z\approx 2.58: outlier
  • e) y‾≈24.85\overline{y}\approx 24.85 mg/L; sy≈17.69s_{y}\approx 17.69 mg/L; the z-score does not change
  • f) Moderate typical value, but 15% of the wells analyzed above the guideline: they are reported, not set aside
a)

Population: all the registered private wells of the farming area, about which the conclusion is drawn.

Sample: the 20 wells drawn at random. Variable: the nitrate concentration expressed as nitrogen, quantitative continuous.

Random selection allows the conclusions to be extended to the registered wells; it says nothing about unregistered wells.

b)

x‾=112.220=5.61\overline{x}=\dfrac{112.2}{20}=5.61 mg/L.

n=20n=20 is even: Med=4.4+4.82=4.6\mathrm{Med}=\dfrac{4.4+4.8}{2}=4.6 mg/L.

s2=932.58−20×5.61219=303.13819≈15.95s^{2}=\dfrac{932.58-20\times 5.61^{2}}{19}=\dfrac{303.138}{19}\approx 15.95, so s≈3.99s\approx 3.99 mg/L.

x‾>Med\overline{x}>\mathrm{Med} and the histogram stretches to the right: the distribution is right-skewed, as is often the case for a concentration.

c)

Three wells exceed 1010 mg/L: 10.610.6, 12.312.3 and 15.915.9, that is 320=15%\dfrac{3}{20}=15\% of the sample.

The mean summarizes the centre; it says nothing about the TAIL of the distribution. A mean of 5.615.61 is compatible with no exceedance as well as with several: only the list of data, or a percentile, can answer.

Pitfall: writing “the mean is below the standard, so the water complies”. A standard applies to each well, not to the mean.

d)

Lower half: the 1010 smallest values, Q1=2.4+2.92=2.65Q_{1}=\dfrac{2.4+2.9}{2}=2.65. Upper half: Q3=7.2+8.12=7.65Q_{3}=\dfrac{7.2+8.1}{2}=7.65.

IQR=5IQR=5, so Q3+1.5 IQR=7.65+7.5=15.15Q_{3}+1.5\,IQR=7.65+7.5=15.15 mg/L.

z=15.9−5.613.99≈2.58z=\dfrac{15.9-5.61}{3.99}\approx 2.58.

15.9>15.1515.9>15.15: the well is an outlier by the rule. It is a value to check (new analysis), then to REPORT: a highly contaminated well is precisely what the study is looking for.

e)

Mean: y‾=1n∑(axi+b)=a∑xin+b=ax‾+b\overline{y}=\dfrac{1}{n}\sum(a x_{i}+b)=a\dfrac{\sum x_{i}}{n}+b=a\overline{x}+b.

Deviations: yi−y‾=a(xi−x‾)y_{i}-\overline{y}=a(x_{i}-\overline{x}), so ∑(yi−y‾)2=a2∑(xi−x‾)2\sum(y_{i}-\overline{y})^{2}=a^{2}\sum(x_{i}-\overline{x})^{2}, hence sy2=a2sx2s_{y}^{2}=a^{2}s_{x}^{2} and sy=∣a∣ sxs_{y}=|a|\,s_{x}.

Here a=4.43a=4.43 and b=0b=0: y‾=4.43×5.61≈24.85\overline{y}=4.43\times 5.61\approx 24.85 mg/L and sy≈4.43×3.994≈17.69s_{y}\approx 4.43\times 3.994\approx 17.69 mg/L.

z-score: yi−y‾sy=a(xi−x‾)a sx=zi\dfrac{y_{i}-\overline{y}}{s_{y}}=\dfrac{a(x_{i}-\overline{x})}{a\,s_{x}}=z_{i} for a>0a>0: it does not depend on the unit.

f)

The right conclusion describes the centre AND the tail, in the units of the guideline:

“The typical concentration in a well is moderate, with a median of 4.64.6 mg/L of nitrogen; but 33 wells out of 2020, that is 15%15\% of the sample, exceed the 1010 mg/L guideline, one of them at 15.915.9 mg/L. These wells must be reported to their owners.”

The other two conclusions make the errors of c) and d): judging a standard on the mean, and setting aside the inconvenient value. The 15%15\% figure is that of the sample; estimating it for the whole area is a problem of inference.

024681012141618mean 5.6110 mg/L15.9

Exercise 10: Problem: summer precipitation, unequal classes and an honest summary

12 answers to check

A weather station recorded the rainfall on each of the 9292 days of a summer, in millimetres. The data, fictitious, are grouped in the table into classes of unequal widths, because heavy rain is rare.

A student drew the histogram below using the frequencies as heights.

Rainfall (mm)[0, 2)[2, 5)[5, 10)[10, 20)[20, 40)
Number of days50161295
510152025303540510152025303540455055rainfall (mm)number of days
  • a) In the student's figure, compute the ratio of the area of the bar [20,40)[20, 40) to that of the bar [0,2)[0, 2), then the ratio of the corresponding numbers of days. Explain what the figure suggests.
  • b) Compute the correct height, the density in days per millimetre, of the bars [0,2)[0, 2), [2,5)[2, 5) and [20,40)[20, 40).
  • c) Compute the mean rainfall per day using the class midpoints, then the total summer rainfall it represents.
  • d) Compute the median by interpolation, and say why this value is a rough approximation here.
  • e) Compute the percentage of days with at least 1010 mm of rain, then the standard deviation using the class midpoints.
  • f) For an article about a typical summer day, then for the water balance of a watershed, choose the measure to publish.

Type your answers, the page tells you right or wrong 0/12

a)
b)
c)
d)
e)
f)
Show the solution

Answers

  • a) Equal areas (ratio 11) for 1010 times fewer days (ratio 0.10.1): heavy rain looks as frequent as the nearly dry days
  • b) 2525; ≈5.33\approx 5.33; 0.250.25 days per mm
  • c) x‾≈5.23\overline{x}\approx 5.23 mm per day; total ≈481\approx 481 mm
  • d) Med≈1.84\mathrm{Med}\approx 1.84 mm; a rough approximation: many dry days at 00 mm, not spread evenly over [0,2)[0, 2)
  • e) ≈15.2%\approx 15.2\%; s≈7.36s\approx 7.36 mm
  • f) Typical day: the median; water balance: the mean, which preserves the total
a)

Student's figure: area of [20,40)[20, 40): 20×5=10020\times 5=100; area of [0,2)[0, 2): 2×50=1002\times 50=100. Ratio of the areas: 11.

Ratio of the days: 550=0.1\dfrac{5}{50}=0.1.

The eye reads areas: the figure suggests there are as many days of heavy rain as nearly dry days, when there are ten times fewer.

Pitfall: using the frequency as the height with unequal classes. The wide bar is inflated by a factor equal to its width.

b)

Density =frequencywidth=\dfrac{\text{frequency}}{\text{width}}, so that the AREA of each bar is the frequency.

[0,2)[0, 2): 502=25\dfrac{50}{2}=25; [2,5)[2, 5): 163≈5.33\dfrac{16}{3}\approx 5.33; [5,10)[5, 10): 2.42.4; [10,20)[10, 20): 0.90.9; [20,40)[20, 40): 520=0.25\dfrac{5}{20}=0.25 days per mm.

Check: the sum of the areas, 50+16+12+9+5=9250+16+12+9+5=92, gives back the total frequency. The solution draws this histogram: the right tail becomes thin, as it should be.

c)

Midpoints: 11; 3.53.5; 7.57.5; 1515; 3030.

∑cini=50+56+90+135+150=481\sum c_{i}n_{i}=50+56+90+135+150=481, so x‾=48192≈5.23\overline{x}=\dfrac{481}{92}\approx 5.23 mm per day.

The estimated summer total is n x‾=∑cini≈481n\,\overline{x}=\sum c_{i}n_{i}\approx 481 mm. The 1414 days with at least 1010 mm contribute 135+150=285135+150=285 of it, more than half.

d)

n2=46\frac{n}{2}=46 and the first class already holds 5050 days: the median is in [0,2)[0, 2), with F=0F=0.

Med=0+46−050×2=1.84\mathrm{Med}=0+\dfrac{46-0}{50}\times 2=1.84 mm

The interpolation assumes the 5050 days are spread evenly between 00 and 22 mm. But a summer usually has many days without rain, all at 00: the true median is probably lower, perhaps zero. With raw data, it could be read directly.

e)

At least 1010 mm: 9+5=149+5=14 days, that is 1492≈15.2%\dfrac{14}{92}\approx 15.2\%.

∑ci2ni=50+196+675+2025+4500=7446\sum c_{i}^{2}n_{i}=50+196+675+2025+4500=7446; s2=7446−92×5.228291≈54.19s^{2}=\dfrac{7446-92\times 5.228^{2}}{91}\approx 54.19; s≈7.36s\approx 7.36 mm.

The standard deviation exceeds the mean (CV≈141%CV\approx 141\%): a mean of 5.235.23 mm “plus or minus 7.367.36” has no symmetric meaning here, since rainfall cannot go below 00. This is the signature of a strongly skewed distribution.

f)

Typical day: the MEDIAN. Half of the days receive less than about 22 mm; the mean, 5.235.23 mm, is reached by only a minority of days.

Water balance: the MEAN, or directly the total, because the watershed receives the sum of all the rain, and only the mean preserves that sum.

Written conclusion: “The summer was dry most of the time, with a median of about 2 mm per day, but fourteen days of heavy rain brought more than half of the 481 mm total.”

5101520253035405101520255.332.40.90.25rainfall (mm)days per mm
Something missing from this set? A type of exercise your teacher gives, a problem you are stuck on, 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.

This chapter comes back in

The chapters that build on it, later in the year or in the years that follow.

© Ahmed Squalli Houssaini. Exercise set published at www.letuteurscientifique.ca/en/exercices/cegep-sn1-descriptive-statistics. Free for personal and classroom use; republishing it elsewhere requires written permission (legal notice).

Looking for a probability and statistics tutor in Montreal?

Get in touch for a first session. Descriptive statistics opens 201-SN1-RE and comes back in every later chapter: a miscomputed standard deviation or a poorly chosen mean costs marks all the way to the final exam.

Site by Studio Squalli