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.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.
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.
•POPULATION AND SAMPLE: the population is the whole set the question is about; the sample, the part that is observed. A parameter (μ, σ) describes the population, a statistic (x, s) 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=n∑xini; median in the middle of the SORTED data; mode, the most frequent value or class. Right skew: in general mode < median < mean.
•DISPERSION: s2=n−1∑(xi−x)2=n−1∑xi2−nx2 for a sample; divisor n for a population. s is in the unit of the data.
•CLASSES: midpoints ci in place of the data; median and percentiles by interpolation, Pk=L+nc100kn−F×w. Unequal classes: height = density wini, the area is the frequency.
•POSITION: z=sx−x; percentile rank PR=nN<+21N=×100 (convention of this set). Outlier: outside [Q1−1.5IQR,Q3+1.5IQR], which does not prove an error.
•LINEAR TRANSFORMATION: if y=ax+b, then y=ax+b, sy=∣a∣sx, and the z-score is unchanged for a>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−1; a data set labelled “population” takes the divisor n.
Two conventions used in this set; replace them with your college's if they differ. Median of grouped data by interpolation: Med=L+nc2n−F×w, where L is the lower boundary of the median class, F the cumulative frequency before it, nc its frequency and w its width. Percentile rank: PR(x)=nN<+21N=×100, where N< counts the data strictly below x and N= the data equal to it.
a) Data 4.2, 5.1, 3.8, 6.0, 4.4: compute the mean x.
b) Data 13, 8, 21, 17, 9, 15: compute the median.
c) Values 1, 2, 3, 4 with frequencies 3, 7, 6, 4 respectively: compute the mean.
f) Same data as in e), treated as a population: compute the standard deviation σ.
g) Classes [0,4), [4,8), [8,12) with frequencies 5, 12, 3: compute the mean using the class midpoints.
h) Same table as in g): compute the median by interpolation.
i) x=68, x=52, s=6.4: compute the z-score of x.
j) x=120, s=15: compute the data value whose z-score is −1.2.
k) In a data set of 25 values, 18 are strictly below x and x appears only once: compute the percentile rank of x.
l) x=40 and s=6: compute the coefficient of variation, as a percentage.
Show the solution
Answers
a)x=4.7
b)Med=14
c)x=2.55
d)Med=2.5
e)s2=17.5
f)σ≈3.74
g)x=5.6
h)Med≈5.67
i)z=2.5
j)x=102
k)PR=74
l)CV=15%
Three moves carry the whole list: SORT before a median, COUNT the total frequency before dividing, and choose the divisor, n−1 for a sample and n for a population.
a)
x=54.2+5.1+3.8+6.0+4.4=523.5=4.7
b)
Sorted data: 8,9,13,15,17,21. With n=6, the median lies between the 3rd and 4th values:
Med=213+15=14
Pitfall: taking the middle of the UNSORTED data, here 21 and 17.
c)
n=3+7+6+4=20 and ∑xini=3+14+18+16=51.
x=2051=2.55
d)
The median is the average of the 10th and 11th values. Cumulative frequencies: 3, 10, 16, 20.
The 10th value is 2 and the 11th is 3, so Med=2.5.
A median is not necessarily a value the variable takes.
e)
x=555=11; deviations −5, −2, −1, 2, 6; squares 25, 4, 1, 4, 36, with sum 70.
s2=5−170=17.5
f)
Population: divide by n=5.
σ=570=14≈3.74
On the same data, the divisor n always gives a smaller result than the divisor n−1.
g)
Midpoints 2, 6, 10; n=20.
x=202×5+6×12+10×3=20112=5.6
h)
2n=10. Cumulative frequencies: 5 then 17: the median class is [4,8), with F=5, nc=12, w=4.
Med=4+1210−5×4≈5.67
i)
z=sx−x=6.468−52=2.5: the value is two and a half standard deviations above the mean.
j)
x=x+zs=120+(−1.2)×15=102
k)
PR=2518+21×1×100=74: about 74% of the data lie below x.
l)
CV=xs×100=406×100=15%
Points are earned before the solution; after it, you can keep practising.
For you:
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 30 stations. For each station, we record X, the number of days in January on which the daily mean concentration of fine particles PM2.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, in μg/m3(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.
a) The network's report covers its 30 stations. Identify the statistical unit and the variable X, then say whether the 30 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 30 stations then form a population or a sample? Is the mean of X 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 X.
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 X is represented by a bar chart with separated bars, and choose the representation suited to variable (1).
Show the solution
Answers
a)Unit: a station of the network; variable X: number of days above the threshold in January; the 30 stations form the population
b)A sample of the points in the region; its mean is a statistic
The statistical unit is the network's STATION; the variable X is the number of days above the threshold in January, a quantitative discrete variable.
The report is only about these 30 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; the unknown value for the whole region is the PARAMETER μ.
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=30 and ∑xini=0+9+14+12+12+5=52.
x=3052≈1.73 days
Median: with n=30, the average of the 15th and 16th values. Cumulative frequencies: 6, 15, 22; the 15th value is 1, the 16th is 2, so Med=1.5 days.
Mode: the most frequent value, 1 day (frequency 9).
A mean of 1.73 days is not a possible value of X: this is not an error, it is a summary.
e)
At most two days: 6+9+7=22 stations, that is 3022≈73.3%.
At least three days: 4+3+1=8 stations, that is 308≈26.7%.
Check: 73.3+26.7=100; the two events are complementary.
f)
X only takes isolated whole values: each bar stands on ITS value, and nothing exists between two bars. Touching bars would suggest stations with 1.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.
Points are earned before the solution; after it, you can keep practising.
For you:
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, over 15 days in April. Rain on snow causes a flood on day 8. The data, fictitious, are in chronological order:
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 (1 day =86400 s).
Show the solution
Answers
a)x=35.2m3/s; Med=28m3/s; mode 27m3/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.53m3/s; Med=28m3/s unchanged: the median resists
e)Usual day: the median; volume: the mean; V≈45.6 million m3
a)
∑xi=528, so x=15528=35.2m3/s.
Sorted data: 22,23,24,25,26,27,27,28,29,31,32,37,45,64,88. With n=15, the median is the 8th value: Med=28m3/s.
The mode is 27m3/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, 88, as the median. The median is read on the sorted data, never in time order.
b)
The flows above 35.2 are 88, 64, 45 and 37: 4 days out of 15.
The mean shares the total equally among the days. Three flood days alone contribute 88+64+45=197 of the 528 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: 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=40: x=15488≈32.53m3/s, that is 2.67 less.
Sorted data: 48 replaces 88 but stays above the 8th value, which is still 28: Med=28m3/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, 28m3/s, says that on one day out of two the flow was at most 28.
The engineer wants a TOTAL: the volume is the sum of the daily flows multiplied by the length of a day, so nx×86400.
V=528×86400≈4.56×107m3, about 45.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.
Points are earned before the solution; after it, you can keep practising.
For you:
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 8 points along a transect across a lake. The readings, in degrees Celsius, are fictitious:
21.4; 22.0; 20.6; 23.1; 21.8; 22.5; 20.9; 21.7.
These 8 points are a sample of all the points on the surface of the lake.
a) Compute the mean x, then draw up the table of deviations xi−x and compute their sum.
b) Prove that, for any set of n data values, i=1∑n(xi−x)=0. Explain why the mean of the deviations therefore cannot measure dispersion.
c) Compute the variance s2 and the standard deviation s of the sample, with their units.
d) Prove that i=1∑n(xi−x)2=i=1∑nxi2−nx2. Compute ∑xi2 and check the formula on these data. Then compute what the right-hand side gives if x is first rounded to 21.8.
e) Compute the standard deviation obtained by dividing by n instead of n−1, and say which of the two should appear in the report.
Show the solution
Answers
a)x=21.75∘C; the sum of the deviations is 0
b)∑(xi−x)=∑xi−nx=0: positive and negative deviations always cancel out
c)s2=0.66(∘C)2; s≈0.81∘C
d)∑xi2=3789.12; 3789.12−3784.5=4.62; with x≈21.8: −12.8, impossible
e)≈0.76∘C; report s≈0.81∘C (sample)
a)
∑xi=174.0, so x=8174.0=21.75∘C.
Deviations, in the order of the readings: −0.35; 0.25; −1.15; 1.35; 0.05; 0.75; −0.85; −0.05.
Sum of the positive deviations: 2.40; sum of the negative deviations: −2.40; total: 0.
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=nx, which is the definition of the mean:
i=1∑n(xi−x)=i=1∑nxi−nx=nx−nx=0
The mean of the deviations is therefore 0 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.1225; 0.0625; 1.3225; 1.8225; 0.0025; 0.5625; 0.7225; 0.0025, with sum 4.62.
s2=8−14.62=0.66(∘C)2 and s=0.66≈0.81∘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∘C as an order of magnitude.
Here ∑xi2=3789.12 and nx2=8×21.752=3784.5: the difference is 4.62, as in c).
With x rounded to 21.8: 3789.12−8×21.82=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.05 is enough to ruin everything. Keep the exact mean, or use the calculator's memory.
e)
Divisor n: 84.62=0.5775≈0.76∘C.
The 8 points are a SAMPLE of the lake: report s≈0.81∘C, with divisor n−1. The deviations are measured around x, which is closer to the data than the true mean μ of the lake: dividing by n would underestimate the dispersion on average. Exercise 7 proves it.
On calculators, s is often labelled sx or σn−1, and the other one σx or σn: read the key before copying the result.
Points are earned before the solution; after it, you can keep practising.
For you:
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 25 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 2 cm:
We are given ∑xi=618.3 and ∑xi2=15704.95. Percentile rank: PR(x)=nN<+21N=×100.
a) Compute the mean x and the standard deviation s of the sample using the two given sums.
b) Compute the z-score of the longest trout, 35.0 cm, then that of the shortest, 17.8 cm.
c) Compute the percentile rank of the 27.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.4 cm and a standard deviation of 3.0 cm. One trout there measures 31.0 cm. Compute its z-score, then say which is larger RELATIVE to its own lake: this trout or the 27.3 cm trout from lake A.
e) The biologists classify as “small” any trout in lake A whose z-score is below −1.5. Compute the length corresponding to z=−1.5.
f) Is the 35.0 cm trout exceptional? Base your answer on its z-score, then on the 1.5 times the interquartile range rule (Q1 and Q3 are the medians of the 12 smallest and the 12 largest values).
Show the solution
Answers
a)x≈24.73 cm; s≈4.15 cm
b)z≈2.47 for 35.0 cm; z≈−1.67 for 17.8 cm
c)PR=74: about 74% of the trout caught are shorter
d)zB=−0.80 against zA≈0.62: the 27.3 cm trout from lake A is relatively the larger
e)x≈18.5 cm
f)Unusual (z≈2.47) but not an outlier: 35.0<Q3+1.5IQR=36.75
a)
x=25618.3=24.732≈24.73 cm.
With the formula proved in exercise 3:
s2=n−1∑xi2−nx2=2415704.95−25×24.7322≈17.21
s≈4.15 cm
b)
z=sx−x: the deviation from the mean counted in standard deviations.
z35.0=4.1535.0−24.73≈2.47 and z17.8=4.1517.8−24.73≈−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.3 cm trout is the 19th in the sorted data: N<=18 and N==1.
PR=2518+21×100=74
About 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=3.031.0−33.4=−0.80; for the 27.3 cm trout from lake A, zA=4.1527.3−24.73≈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.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=sx−x for x: x=x+zs.
x=24.732−1.5×4.149≈18.5 cm
Only one trout caught, the 17.8 cm one, is “small” by this criterion.
f)
z≈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=221.2+21.8=21.5 and Q3=227.3+27.9=27.6, so IQR=6.1.
Upper fence: 27.6+1.5×6.1=36.75 cm. Since 35.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.
Points are earned before the solution; after it, you can keep practising.
For you:
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, 16 fictitious measurements, sorted:
9; 19; 21; 22; 23; 24; 24; 25; 26; 26; 27; 28; 29; 30; 31; 33. The 9 cm measurement was taken near the mouth of a stream.
Lake B is summarized by the box plot below: minimum 16, Q1=20, median 23, Q3=25, maximum 27.
Convention: Q1 and Q3 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 15 cm of ice.
a) Determine Q1, the median and Q3 of the thicknesses on lake A.
b) Compute the interquartile range IQR and the fences Q1−1.5IQR and Q3+1.5IQR, 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.
Show the solution
Answers
a)Q1=22.5 cm; Med=25.5 cm; Q3=28.5 cm
b)IQR=6 cm; fences 13.5 and 37.5 cm; one outlier: 9 cm
c)Box from 22.5 to 28.5, median 25.5; whiskers from 19 to 33; isolated point at 9
d)Lake A: median 25.5>23 and IQR=6>5
e)Lake A closed (minimum 9<15); lake B open (minimum 16≥15): the MINIMUM decides
f)No: an outlier is not an error; this measurement flags a dangerous zone
a)
n=16 is even: the median is the average of the 8th and 9th values, Med=225+26=25.5 cm.
Lower half: 9,19,21,22,23,24,24,25, with median Q1=222+23=22.5 cm.
Upper half: 26,26,27,28,29,30,31,33, with median Q3=228+29=28.5 cm.
Other conventions (software, position (n+1)/4) give slightly different quartiles: state the one you follow.
b)
IQR=Q3−Q1=28.5−22.5=6 cm.
Q1−1.5IQR=22.5−9=13.5 cm and Q3+1.5IQR=28.5+9=37.5 cm.
Only the 9 cm measurement lies outside these fences: it is the only outlier by the rule.
c)
The box runs from Q1=22.5 to Q3=28.5, split by the median 25.5.
The right whisker runs to the maximum, 33 cm, which is below 37.5.
The left whisker stops at 19 cm, the smallest value that is not an outlier; the 9 cm measurement is an isolated point.
Pitfall: drawing the whisker all the way to 9. The box plot would then suggest an even spread from 9 to 33, and the dangerous point would vanish into the line.
d)
Medians: 25.5 cm for A against 23 cm for B. Interquartile ranges: 6 cm for A against 25−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.81 cm, also exceeds the median of B.
e)
Lake A: one measurement is 9 cm, below 15 cm: the trail does not open. Lake B: the minimum is 16 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.
Points are earned before the solution; after it, you can keep practising.
For you:
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 120 snapping turtle eggs and group the masses, in grams, into classes of width 1 g. The data are fictitious.
The median and the percentiles are computed by linear interpolation within their class: the kth percentile is Pk=L+nc100kn−F×w, with the notation of exercise 0.1.
Mass (g)
[8, 9)
[9, 10)
[10, 11)
[11, 12)
[12, 13)
[13, 14)
Number of eggs
6
15
31
38
21
9
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 using the class midpoints.
c) Compute the standard deviation s using the class midpoints, treating the 120 eggs as a sample.
d) Give the modal class, then compute the median by interpolation.
e) Compute the 90th percentile P90, then the percentile rank of a 10.5 g egg, assuming the eggs are spread evenly within their class.
f) On the 120 raw masses, the exact mean is 11.19 g. Explain the gap with the result of b), then compare the mean and the median to describe the shape of the distribution.
Show the solution
Answers
a)Quantitative continuous; 17.5% of the eggs weigh less than 10 g
b)x≈11.17 g
c)s≈1.26 g
d)Modal class [11,12); Med≈11.21 g
e)P90≈12.86 g; percentile rank of 10.5 g: about 30
f)The midpoints replace the true masses; x<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 10 g: 6+15=21 eggs, that is 12021=17.5%.
b)
Midpoints: 8.5; 9.5; 10.5; 11.5; 12.5; 13.5. Each midpoint is weighted by the frequency of its class:
∑cini=51+142.5+325.5+437+262.5+121.5=1340
x=1201340≈11.17 g
Pitfall: averaging the six midpoints, 11 g, as if each class contained the same number of eggs.
c)
∑ci2ni=15152. Using the computing formula from exercise 3, weighted:
s2=n−1∑ci2ni−nx2=11915152−120×11.162≈1.585
s≈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 g and x+s≈12.4 g; the histogram is consistent with this reading.
d)
The modal class is the one with the highest frequency: [11,12), with 38 eggs. With classes of equal width, it is also the tallest bar.
Median: 2n=60. Cumulative frequencies: 6, 21, 52, 90: the 60th value is in [11,12), with F=52 and nc=38.
Med=11+3860−52×1≈11.21 g
e)
P90: 0.90×120=108; 90 eggs come before the class [12,13), which contains 21.
P90=12+21108−90×1≈12.86 g: about 90% of the eggs weigh less.
Percentile rank of 10.5 g: 21 eggs in the earlier classes, plus half of the 31 eggs in [10,11) if these are spread evenly.
PR≈12021+15.5×100≈30.4, that is about 30.
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.02 g measures the cost of this assumption, small here because the classes are narrow.
x≈11.17<Med≈11.21: the distribution is slightly stretched toward small masses, as shown by the classes [8,9) and [9,10), which hold more eggs than [13,14).
Such a small gap between mean and median signals a slight skew; on its own, it is not enough to prove it.
Points are earned before the solution; after it, you can keep practising.
For you:
Exercise 7: Proofs: the mean minimizes the squared deviations, and why we divide by n minus 1
7 answers to check
Let x1,…,xn be a data set with mean x. For every real number c, we study the sum of the squared deviations from c: f(c)=i=1∑n(xi−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 2, 6 and 10 mm of rain. Samples of size n=2 are drawn at random from it, WITH replacement.
a) Compute f′(c), then prove that f reaches its minimum at c=x, and only there.
b) Prove that f(c)=i=1∑n(xi−x)2+n(x−c)2. Apply this identity to the temperatures of exercise 3 (n=8, x=21.75, ∑(xi−x)2=4.62) to compute f(22).
c) Let μ 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 instead of deviations from μ.
d) Compute the mean μ and the variance σ2 (divisor N=3) of the population of three rain gauges.
e) List the 9 ordered samples of size 2 drawn with replacement. For each one, compute s2 (divisor n−1=1) and the variance with divisor n=2, then compute the mean of each of the two over the 9 samples.
f) Conclude: which of the two divisors gives, on average, the variance of the population?
Show the solution
Answers
a)f′(c)=−2∑(xi−c)=2n(c−x), zero only at x; f′′=2n>0: minimum
b)Identity proved; f(22)=4.62+8×0.252=5.12
c)∑(xi−x)2≤∑(xi−μ)2: deviations from x underestimate the dispersion
d)μ=6 mm; σ2=332≈10.67mm2
e)Mean of the s2: 996≈10.67; divisor n: 948≈5.33
f)The divisor n−1: on average s2=σ2; the divisor n gives nn−1σ2
a)
f is a polynomial of degree 2 in c. Differentiate term by term:
f′(c)=i=1∑n−2(xi−c)=−2(∑xi−nc)=2n(c−x)
f′(c)=0 if and only if c=x; f′ is negative before, positive after, and f′′(c)=2n>0.
So f has a global minimum at c=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) and expand the square:
f(c)=∑(xi−x)2+2(x−c)∑(xi−x)+n(x−c)2
The middle term is zero, because ∑(xi−x)=0 (exercise 3). Hence the identity.
Lake temperatures: f(22)=4.62+8×(21.75−22)2=4.62+0.5=5.12.
This confirms a): the term n(x−c)2 is positive, except at c=x.
c)
With c=μ: ∑(xi−μ)2=∑(xi−x)2+n(x−μ)2≥∑(xi−x)2.
The sample does not know μ and measures its deviations around x, the point closest to ITS OWN data. The resulting sum of squares is in general too small, by n(x−μ)2.
Dividing this sum by n therefore underestimates the dispersion of the population; dividing by n−1, a smaller number, compensates.
d)
μ=32+6+10=6 mm.
σ2=3(2−6)2+(6−6)2+(10−6)2=332≈10.67mm2
e)
The 9 samples: (2,2), (2,6), (2,10), (6,2), (6,6), (6,10), (10,2), (10,6), (10,10), all equally likely.
For two data values a, b with mean 2a+b, the sum of squared deviations is 2(a−b)2, so s2=2(a−b)2 and the version with divisor 2 is 4(a−b)2.
Values of s2: 0; 8; 32; 8; 0; 8; 32; 8; 0, with sum 96 and mean 996=332≈10.67.
Values with divisor 2: half as large, with mean 948≈5.33.
The chart in the solution shows the nine values of s2: none of them equals σ2, but their mean lands exactly on it.
f)
The mean of the s2 equals σ2: over all possible samples, the divisor n−1 is right on average. We say that s2 is an UNBIASED estimator of σ2; the course on inference proves it in general for sampling with replacement.
The divisor n gives on average nn−1σ2, here half; for the 8 points of the lake, it would lose 81 of the variance on average.
A nuance: it is s2 that is unbiased, not s. The square root slightly distorts the average, and s slightly underestimates σ for small samples.
The sum f(c) for the lake temperatures: a parabola whose minimum, 4.62, is reached at c=x=21.75.
The s2 of the 9 samples of size 2: none equals σ2, but their mean, 10.67, is exactly σ2.
Points are earned before the solution; after it, you can keep practising.
For you:
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: concentration is therefore a discrete variable.”
b) “If the temperatures of a lake are converted from degrees Celsius to kelvins, by adding 273.15 to each reading, the standard deviation increases by 273.15.”
c) “A trout whose z-score is 2 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 90 reaches 90% of the largest thickness measured.”
Show the solution
Answers
a)Continuous: the rounding belongs to the instrument; the quantity varies continuously
b)s unchanged; only the mean increases by 273.15
c)z=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% 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 b to all the data shifts the mean by b and leaves each deviation xi−x unchanged: the standard deviation does not move.
One-line proof: yi−y=(xi+b)−(x+b)=xi−x.
Correction: in kelvins, the mean increases by 273.15 and the standard deviation stays the same, in kelvins or in degrees Celsius, since a difference of 1 K equals a difference of 1∘C.
c)
The z-score counts the deviation from the mean in standard deviations: x=x+zs. With z=2, the trout measures x+2s, not 2x.
Example from lake A in exercise 4: 24.73+2×4.15≈33.0 cm, far from 2×24.73≈49.5 cm.
Correction: a trout with z-score z=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 wini, 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 30 cm measurement has percentile rank 1613+0.5×100≈84, and equals 3330≈91% of the maximum: two unrelated numbers.
Correction: an ice thickness with percentile rank 90 is greater than about 90% of the thicknesses measured.
Points are earned before the solution; after it, you can keep practising.
For you:
Exercise 9: Problem: nitrates in private wells, a complete study
14 answers to check
A regional agency analyzes the water of 20 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.8; 1.2; 1.5; 2.1; 2.4; 2.9; 3.3; 3.6; 4.0; 4.4; 4.8; 5.3; 5.9; 6.5; 7.2; 8.1; 9.4; 10.6; 12.3; 15.9. We are given ∑xi=112.2 and ∑xi2=932.58.
Guideline: the Canadian drinking water guideline sets a maximum acceptable concentration of 45 mg/L of nitrate, about 10 mg/L expressed as nitrogen. To convert from nitrogen to the nitrate ion, multiply by 4.43, the ratio of the molar masses of NO3− and N.
a) Identify the population, the sample and the variable of the study.
b) Compute the mean, the median and the standard deviation s 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 Q1, Q3 and the fence Q3+1.5IQR (medians of the two halves), then the z-score of the well at 15.9 mg/L. Is this well an outlier by the rule?
e) Prove that if yi=axi+b for every i, then y=ax+b and sy=∣a∣sx. 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.
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 mg/L; Med=4.6 mg/L; s≈3.99 mg/L
c)15% (3 wells out of 20); a mean below the guideline does not rule out exceedances
e)y≈24.85 mg/L; sy≈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=20112.2=5.61 mg/L.
n=20 is even: Med=24.4+4.8=4.6 mg/L.
s2=19932.58−20×5.612=19303.138≈15.95, so s≈3.99 mg/L.
x>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 10 mg/L: 10.6, 12.3 and 15.9, that is 203=15% of the sample.
The mean summarizes the centre; it says nothing about the TAIL of the distribution. A mean of 5.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 10 smallest values, Q1=22.4+2.9=2.65. Upper half: Q3=27.2+8.1=7.65.
IQR=5, so Q3+1.5IQR=7.65+7.5=15.15 mg/L.
z=3.9915.9−5.61≈2.58.
15.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=n1∑(axi+b)=an∑xi+b=ax+b.
Deviations: yi−y=a(xi−x), so ∑(yi−y)2=a2∑(xi−x)2, hence sy2=a2sx2 and sy=∣a∣sx.
Here a=4.43 and b=0: y=4.43×5.61≈24.85 mg/L and sy≈4.43×3.994≈17.69 mg/L.
z-score: syyi−y=asxa(xi−x)=zi for a>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.6 mg/L of nitrogen; but 3 wells out of 20, that is 15% of the sample, exceed the 10 mg/L guideline, one of them at 15.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% figure is that of the sample; estimating it for the whole area is a problem of inference.
Points are earned before the solution; after it, you can keep practising.
For you:
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 92 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 days
50
16
12
9
5
a) In the student's figure, compute the ratio of the area of the bar [20,40) to that of the bar [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), [2,5) and [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 10 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.
Show the solution
Answers
a)Equal areas (ratio 1) for 10 times fewer days (ratio 0.1): heavy rain looks as frequent as the nearly dry days
b)25; ≈5.33; 0.25 days per mm
c)x≈5.23 mm per day; total ≈481 mm
d)Med≈1.84 mm; a rough approximation: many dry days at 0 mm, not spread evenly over [0,2)
e)≈15.2%; s≈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×5=100; area of [0,2): 2×50=100. Ratio of the areas: 1.
Ratio of the days: 505=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 =widthfrequency, so that the AREA of each bar is the frequency.
[0,2): 250=25; [2,5): 316≈5.33; [5,10): 2.4; [10,20): 0.9; [20,40): 205=0.25 days per mm.
Check: the sum of the areas, 50+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: 1; 3.5; 7.5; 15; 30.
∑cini=50+56+90+135+150=481, so x=92481≈5.23 mm per day.
The estimated summer total is nx=∑cini≈481 mm. The 14 days with at least 10 mm contribute 135+150=285 of it, more than half.
d)
2n=46 and the first class already holds 50 days: the median is in [0,2), with F=0.
Med=0+5046−0×2=1.84 mm
The interpolation assumes the 50 days are spread evenly between 0 and 2 mm. But a summer usually has many days without rain, all at 0: the true median is probably lower, perhaps zero. With raw data, it could be read directly.
e)
At least 10 mm: 9+5=14 days, that is 9214≈15.2%.
∑ci2ni=50+196+675+2025+4500=7446; s2=917446−92×5.2282≈54.19; s≈7.36 mm.
The standard deviation exceeds the mean (CV≈141%): a mean of 5.23 mm “plus or minus 7.36” has no symmetric meaning here, since rainfall cannot go below 0. This is the signature of a strongly skewed distribution.
f)
Typical day: the MEDIAN. Half of the days receive less than about 2 mm; the mean, 5.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.”
Points are earned before the solution; after it, you can keep practising.
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.
This chapter comes back in
The chapters that build on it, later in the year or in the years that follow.
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.