Advanced Statistics 201-337 • CEGEP, Montreal

Revision sheet: descriptive statistics (201-337)

Descriptive statistics is the chapter where everyone knows how to compute and where many still lose marks: the question asks which indicator describes the data honestly, and the calculator does not answer that question.

This sheet leaves the formulas in your notebook and gathers the decisions that earn marks: recognizing a skewed distribution, choosing between nn and n−1n-1, weighting before averaging, and setting an outlier aside only after investigating it, never because it is in the way. It is written for CEGEP students taking 201-337; once you have read it, the corrected exercise set on the same chapter puts every reflex to the test.

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

The thread of the chapter

In descriptive statistics, the calculation is never what costs marks: it is the CHOICE of the indicator, mean or median, nn or n−1n-1, absolute or relative spread.

This chapter is part of 201-337, Advanced Statistics

The essentials

Three measures of centre, three different messages

  • • Mean x‾=∑xin\overline{x}=\dfrac{\sum x_{i}}{n}: it uses all the data, so it is affected by extreme values.
  • • Median: the middle value once the data are sorted. It ignores how far out the extremes are, only how many there are.
  • • Mode: the most frequent value, the only indicator that can be used on a qualitative variable.
  • • If x‾>\overline{x}> median, the distribution is skewed to the RIGHT: this is the case for incomes, waiting times and real estate prices.
02840100150median 28mean 40the tail pulls the meanincome (thousands of dollars)
On a distribution skewed to the right, the mean is pulled toward the tail while the median stays in the bulk of the population: 4040 against 2828.

The gap between the mean and the median is a diagnosis, not a calculation error. A question that gives both expects you to comment on that gap.

Spread, and the choice of n or n minus 1

  • • Variance of a SAMPLE: s2=∑(xi−x‾)2n−1s^{2}=\dfrac{\sum(x_{i}-\overline{x})^{2}}{n-1}. Variance of a POPULATION: σ2=∑(xi−μ)2n\sigma^{2}=\dfrac{\sum(x_{i}-\mu)^{2}}{n}.
  • • We divide by n−1n-1 because the mean has already been estimated from the same data: only n−1n-1 independent deviations remain.
  • • The standard deviation is the square root of the variance, and it carries the unit of the data; the variance carries that unit squared.
  • • Coefficient of variation CV=sx‾×100CV=\dfrac{s}{\overline{x}}\times 100: RELATIVE spread, with no unit, the only way to compare two data sets on different scales.
30405060703040506070data set 1: s ≈ 2.4data set 2: s ≈ 12.9
Same mean 5050: data set 1 (blue) is packed around the centre, s≈2.4s\approx 2.4; data set 2 (orange) is spread out, s≈12.9s\approx 12.9. The mean alone does not tell them apart.

A PARAMETER describes the population and is written with Greek letters, μ\mu and σ\sigma; a STATISTIC describes the sample and is written x‾\overline{x} and ss. The choice of denominator follows from that reading, not from a preference.

The z-score: comparing what cannot be compared

  • • z=x−x‾sz=\dfrac{x-\overline{x}}{s} expresses a deviation as a NUMBER of standard deviations.
  • • A positive zz-score places the data value above the mean, a negative one below; its absolute value measures how exceptional it is.
  • • Two marks from different scales can only be compared after converting them to zz-scores.
  • • A transformation y=ax+by=ax+b gives y‾=ax‾+b\overline{y}=a\overline{x}+b and sy=∣a∣ sxs_{y}=|a|\,s_{x}: the zz-score is therefore INVARIANT if a>0a>0.
30405060708090x = 75−3−2−10123z = 1.5xz
Mean 6060, standard deviation 1010: x=75x=75 lies one and a half standard deviations above the centre, z=75−6010=1.5z=\dfrac{75-60}{10}=1.5. The zz axis is the same axis, relabelled in standard deviations.

Adding a constant to all the data moves the centre without changing the spread. It is the quickest check on a transformation question.

Quartiles, interquartile range and outliers

  • • Q1Q_{1}, Q2Q_{2} the median and Q3Q_{3} split the data into four parts with equal frequencies.
  • • Interquartile range IQR=Q3−Q1IQR=Q_{3}-Q_{1}: the spread of the core of the data, insensitive to the extremes.
  • • Any data value outside [Q1−1.5 IQR,Q3+1.5 IQR][Q_{1}-1.5\,IQR, Q_{3}+1.5\,IQR] is an outlier.
  • • On an ogive, the cumulative frequencies are plotted against the UPPER BOUNDARY of each class, never its midpoint.
010203040506070minQ₁MQ₃max25%25%25%25%
Each piece of the box and the whiskers holds 25%25\% of the data: a LONG whisker signals spread-out data, not more data.

The 1.5 IQR1.5\,IQR criterion flags a data value to be examined, it does not allow it to disappear. Investigate where it comes from, and publish both analyses if doubt remains.

The mistakes that cost marks

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

1. Summarizing a visibly skewed distribution by its mean

2 marks, it is the interpretation question of the exam

What not to write

“The mean salary is 5858 thousand dollars, so the typical employee earns about 5858 thousand dollars.”

What to write

“The mean is 5858, the median 4141: the distribution is skewed to the right and it is the median that describes the typical employee.”

04080120160200median 41mean 58200
Eight salaries out of nine are below the mean 5858 (red), pulled by the 200200; the median 4141 (green) falls in the middle of the cluster, where the typical employee is.

Why: A single very high salary is enough to move the mean by several thousand dollars without touching the median. The exam tests this reflex every semester.

2. Dividing the variance of a sample by n

1.5 marks, and every zz-score in the next question

What not to write

“s2=∑(xi−x‾)2ns^{2}=\dfrac{\sum(x_{i}-\overline{x})^{2}}{n}, as in high school.”

What to write

“The data are a SAMPLE, so s2=∑(xi−x‾)2n−1s^{2}=\dfrac{\sum(x_{i}-\overline{x})^{2}}{n-1}.”

Why: The mean was computed from the same data, which uses up one degree of freedom. Dividing by nn systematically underestimates the spread, all the more so when the sample is small.

3. Averaging means without taking the group sizes into account

2 marks, and the error goes unnoticed for lack of a check

What not to write

“Department A at 4848, department B at 6262, so the company is at 48+622=55\dfrac{48+62}{2}=55.”

What to write

“x‾=12×48+28×6240=57.8\overline{x}=\dfrac{12\times 48+28\times 62}{40}=57.8: we weight by the group sizes.”

444852566064A: 12 employees at 48B: 28 employees at 62naive midpoint: 55weighted: 57.8
The naive midpoint falls at 5555, halfway between the two departments; the weighted mean is at 57.857.8, pulled toward the department of 2828 employees.

Why: The mean of means is correct only if the groups have the same size. The weighted result always leans toward the larger group, which gives an immediate check.

4. Comparing the standard deviations of two data sets on different scales

1.5 marks, and a reversed conclusion

What not to write

“Salaries have a standard deviation of 80008000 dollars and ages of 66 years: so the salaries are far more spread out.”

What to write

“Compare the coefficients of variation: 800052000×100≈15%\dfrac{8000}{52000}\times 100\approx 15\% against 638×100≈16%\dfrac{6}{38}\times 100\approx 16\%, so the ages are slightly more spread out.”

Why: A standard deviation carries the unit of the variable: dollars cannot be compared with years. Only relative spread has no unit.

5. Treating as quantitative a variable that is not

1 mark, and the typology question that opens the exam

What not to write

“The mean postal code of the respondents is H3GH3G... so 34,51234{,}512.”

What to write

“A postal code is a qualitative NOMINAL variable: we give its frequencies and its mode, never a mean.”

Why: Digits do not make a variable quantitative. The test is to ask whether the difference between two values makes sense: between two postal codes, it makes none.

6. Believing that a larger sample corrects a bias

2 marks on the methodology question

What not to write

“The poll is online on our website, but with 10,00010{,}000 replies the result is reliable.”

What to write

“Size only reduces RANDOM error. A selection bias is never corrected by surveying more people; the recruiting method has to change.”

online, 10,000tight, off-centrerandomspread out, centred
The centre of the target is the true value. A large, badly recruited sample packs its replies FAR from the centre (red): more replies pack them even tighter, without bringing them back to the centre.

Why: Surveying more people from the same badly chosen group makes the error more precise, not more accurate. That is the result the marker is looking for: precision and accuracy are two different things.

7. Applying the outlier criterion with the standard deviation

1.5 marks, and a wrong box plot

What not to write

“The data value is more than 1.51.5 standard deviations from the mean, so it is an outlier.”

What to write

“The criterion uses the quartiles: any data value outside [Q1−1.5 IQR,Q3+1.5 IQR][Q_{1}-1.5\,IQR, Q_{3}+1.5\,IQR] is an outlier.”

020406080100120Q₁MQ₃Q₁ − 1.5 IQR = 10Q₃ + 1.5 IQR = 90120: outlier
The two fences are computed from the quartiles; the whisker stops at the last data value before the fence, and only the value 120120 is declared an outlier.

Why: The mean and the standard deviation are themselves distorted by the suspicious value: using them to judge it is like letting the accused write the indictment. The quartiles do not move.

8. Believing that adding a constant changes the spread

1 mark, often two lines of a table to fill in

What not to write

“We add 55 points to every paper, so the mean and the standard deviation both go up by 55.”

What to write

“y=x+5y=x+5 gives y‾=x‾+5\overline{y}=\overline{x}+5 but sy=sxs_{y}=s_{x}: the spread does not change.”

024681012141618xx + 5
Each data value moves forward by 55 (parallel arrows): the mean goes from 77 to 1212, but the gaps between the points, and so the standard deviation, do not change.

Why: A translation moves all the data by the same amount: the distances between them are unchanged. Only a multiplying factor changes the spread, and it multiplies it by ∣a∣|a|.

9. Drawing the ogive on the class midpoints

1.5 marks, and every percentile read afterwards

What not to write

“I plot the cumulative frequency of the class [30,40)[30, 40) at the point x=35x=35, the midpoint of the class.”

What to write

“A CUMULATIVE frequency is reached at the end of the class: it is plotted against the upper boundary, x=40x=40.”

102030405060204060801003328upper boundariesmidpoints: wrong
The same data read on the upper boundaries give P80≈33P_{80}\approx 33; plotted on the class midpoints, they would give 2828, half a class width too low.

Why: The running total counts everything below a value: it is only complete at the end of the class. Shifting by half a class width shifts every percentile at once.

Which method to choose

Which indicator of centre and spread to choose

Look at the type of variable, then at the shape of the distribution.

qualitativethe modesymmetricmean and sskewedmedian and IQR
The shapes the tree decides between: categories (the mode, blue bar), symmetric bell (mean and median together), skewed distribution (median in blue, mean in orange, pulled by the tail).
  • If qualitative nominal variable → mode only, with the frequencies and the percentages

    Example: favourite colour, postal code, program of study

  • If quantitative variable, symmetric distribution with no extreme value → mean and standard deviation

    Example: heights of a group of adults

  • If skewed distribution, or outliers present → median and interquartile range

    Example: incomes, housing prices, waiting times

  • If the spread of two data sets with different units or scales must be compared → coefficient of variation

    Example: 15%15\% for the salaries against 16%16\% for the ages

  • If two individual values from two distributions must be compared → zz-score

    Example: 18/2018/20 in a strong class against 85/10085/100 in another

None of these branches is decided on the calculator: they are decided by looking at the dot plot or the histogram. That is why the exam almost always asks you to justify the choice.

Which denominator, which notation

Read whether the data describe the whole population or only a sample.

populationμ and σdivide by nsamples: by n − 1
The sample is a part of the population: x‾\overline{x} and ss are computed on it to ESTIMATE μ\mu and σ\sigma, hence the n−1n-1; on the whole population, divide by nn.
  • If the data cover the whole population studied → divide by nn, and write μ\mu and σ\sigma

    Example: the marks of the 3232 students of a class, when the class is the population

  • If the data are a sample drawn from a larger population → divide by n−1n-1, and write x‾\overline{x} and ss

    Example: 4040 parts taken from a continuous production run

  • If the question says nothing but speaks of a poll, a sample taken or an estimate → it is a sample: n−1n-1

    Example: “200200 customers were surveyed”

  • If the calculator displays both results → take sxs_{x} for a sample, σx\sigma_{x} for a population, and write which one was chosen

    Example: on a TI, Sx\text{Sx} and σx\sigma\text{x} appear one under the other

Writing a sentence such as “the data are a sample, so I divide by n−1n-1” earns the justification mark even when the numerical value is then copied wrongly.

How the answer is expected to be written

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

Detecting and commenting on an outlier

When to use it: The question asks whether a data value is an outlier, or gives a box plot to construct.

  1. 1 Sort the data and compute Q1Q_{1}, Q2Q_{2} and Q3Q_{3}, writing down the positions used.
  2. 2 Compute IQR=Q3−Q1IQR=Q_{3}-Q_{1}, then the two fences Q1−1.5 IQRQ_{1}-1.5\,IQR and Q3+1.5 IQRQ_{3}+1.5\,IQR.
  3. 3 Compare each extreme data value with the fences and name those that fall outside.
  4. 4 Conclude without deleting the data value: say what you would do to explain it.

Concluding sentence

“IQR=60−40=20IQR=60-40=20, so the fences are 1010 and 9090. The value 120120 is greater than 9090: it is an outlier, to be checked before any decision, not deleted.”

The trap: Extending the whisker all the way to the fence: it stops at the last data value actually observed before it.

Marking: 1 mark for the quartiles, 1 mark for the two fences, 1 mark for the nuanced conclusion.

Comparing two values with z-scores

When to use it: Two marks, two measurements or two performances from different distributions must be compared.

  1. 1 Write down for each distribution its mean and its standard deviation, with the right notation.
  2. 2 Compute each zz-score separately, keeping two decimals.
  3. 3 Compare the two scores, not the two raw values.
  4. 4 Conclude by interpreting the score as a number of standard deviations above or below the mean.

Concluding sentence

“zA=85−7010=1.5z_{A}=\dfrac{85-70}{10}=1.5 and zB=18−144=1z_{B}=\dfrac{18-14}{4}=1: performance AA is better, because it lies 1.51.5 standard deviations above its mean against 11 for BB.”

The trap: Comparing 8585 and 1818, or comparing the raw deviations 1515 and 44 without dividing each by its own standard deviation.

Marking: 1 mark per correctly computed score, 1 mark for the conclusion expressed in standard deviations.

Check before you hand in

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

The typical problem, taken apart

The mean of the company, and the one the management announces

Department A has 1212 employees whose mean salary is 4848 thousand dollars; department B has 2828, with a mean salary of 6262 thousand dollars.

The management announces a mean salary of 5555 thousand dollars for the company. Is that correct? And if a manager earning 200200 thousand dollars joined department A, what should be published?

486201240dept. A12employeesdept. B28employeesemployeesmean salary (thousands of dollars)
Each department is a rectangle: width the number of employees, height the mean salary, area the payroll. The mean of the company is the single height that keeps the total area over 4040 employees.

Step 1

Total number of employees: 12+28=4012+28=40.

Why

The denominator of a weighted mean is the sum of the weights, not the number of groups. The whole question turns on this.

Step 2

Sum of the salaries: 12×48+28×62=576+1736=231212\times 48+28\times 62=576+1736=2312 thousand dollars.

Why

Each department mean gives back the sum of its group once multiplied by its size. The total payroll is thus rebuilt without knowing the individual salaries.

Step 3

Mean of the company: 231240=57.8\dfrac{2312}{40}=57.8 thousand dollars.

Why

The result does lie between 4848 and 6262, and leans toward 6262: the consistency check is immediate and proves that 5555 is wrong.

Step 4

With the manager at 200200: 2312+20041≈61.3\dfrac{2312+200}{41}\approx 61.3 thousand dollars, while the median barely moves.

Why

A single extreme data value moves the mean by 3.53.5 thousand dollars. It is the numerical proof of what “the mean is affected by extremes” means.

Step 5

Check: 57.8×40=231257.8\times 40=2312, and 5555 would be the right answer only if the two departments had 2020 employees each.

Why

The inverse operation validates the calculation, and the equal-size condition names exactly the hidden assumption behind the mean of means.

The conclusion, written out

“The mean of the company is 57.857.8 thousand dollars, not 5555: the mean of means assumes equal group sizes, which is not the case here. With an extreme salary, the median should be published next to the mean.”

The classic mistake on this problem: Adding 4848 and 6262 then dividing by 22: the result, 5555, is that of an imaginary company where the two departments would have the same size.

Learn by heart

  • • Mean greater than the median: distribution skewed to the RIGHT, and it is the median that describes the typical case.
  • • Sample: n−1n-1 and the notations x‾\overline{x}, ss. Population: nn and the notations μ\mu, σ\sigma.
  • • z=x−x‾sz=\dfrac{x-\overline{x}}{s}: a deviation measured in number of standard deviations, with no unit.
  • • Outlier: outside [Q1−1.5 IQR,Q3+1.5 IQR][Q_{1}-1.5\,IQR, Q_{3}+1.5\,IQR], with IQR=Q3−Q1IQR=Q_{3}-Q_{1}.
  • • CV=sx‾×100CV=\dfrac{s}{\overline{x}}\times 100: the only spread that compares from one data set to another.
  • • y=ax+by=ax+b: y‾=ax‾+b\overline{y}=a\overline{x}+b and sy=∣a∣ sxs_{y}=|a|\,s_{x}. The +b+b NEVER changes the spread.
  • • On an ogive, the cumulative frequency is plotted at the UPPER BOUNDARY of the class.
  • • A larger sample reduces random error, never a bias.

Frequently asked questions

Should I use the mean or the median?

The median as soon as the distribution is skewed or an extreme value is present, which is the case for incomes, prices and waiting times. The mean suits symmetric distributions with no outlier. If both are asked for, the gap between them is exactly what you need to comment on.

Why do we divide by n minus 1 for a sample?

Because the mean used in the formula was itself estimated from the same data. Once the mean is fixed, only n minus one deviations are free, the last one follows from the others. Dividing by n would therefore underestimate the true spread of the population, all the more so when the sample is small.

How do I know whether a data value is an outlier?

Compute the interquartile range, the difference between the third and the first quartile, then the two fences located one and a half times that range on either side of the box. Any data value outside this interval is declared an outlier. The criterion rests on the quartiles, never on the mean and the standard deviation, which the suspicious value already distorts.

What is the z-score used for?

To make values from different distributions comparable. It expresses the distance from the mean as a number of standard deviations, so it has no unit. A score of one and a half means that the value lies one and a half standard deviations above the mean of its own data set, which can be compared directly with the score from another data set.

Is a poll with a lot of replies necessarily reliable?

No. The number of replies only reduces the error due to the luck of sampling. If the respondents were badly recruited, for example only through online volunteering, the bias stays whole and even gains in apparent precision. Correcting a bias requires changing the method, not surveying more people.

Practise it

Corrected exercises: Descriptive statistics, 201-337

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

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

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

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

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

Next sheet Probability and distributions

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

See also

Looking for a 201-337 tutor in Montreal?

Get in touch for a first session. We go back over the choices that cost marks in statistics, from the mean against the median to the right denominator, then we test them on exercises at the level of real CEGEP tests.

Site by Studio Squalli