Free access until 31 December 2026 · Physics and Maths questions and notes, updated continuously · Build a test

ExaminerPrep › IB Maths AA › Notes

IB Maths AA · Topic 4 · 4.1 · SL and HL

Sampling, bias and outliers

This note explains how to choose a sample from a population, how the method of choosing can introduce bias, and how to decide whether a data value is an outlier. These ideas decide whether the statistics you calculate later can be trusted.

Key ideas

Population and sample. The population is the whole group you want to know about. A sample is the smaller group you actually collect data from. We use samples because testing everyone is usually too slow, too costly or impossible (for example, testing every battery to destruction).

Types of data. Discrete data can only take separate values, usually counted (number of goals). Continuous data can take any value in a range, usually measured (time, mass, height).

Sampling methods.

  • Simple random sampling: every member of the population, and every group of the chosen size, has an equal chance of being picked. For example, number everyone and use a random number generator.
  • Convenience sampling: you pick whoever is easiest to reach, such as the first people you meet. It is quick but often biased.
  • Systematic sampling: choose a random starting point on an ordered list, then take every \(k\)th member. For a population of size \(N\) and sample size \(n\), \(k\approx N/n\).
  • Stratified sampling: split the population into groups (strata) that share a characteristic, such as year group or job type, then take a random sample from each group. The number from each stratum is in proportion to its size: \[ \text{sample from stratum}=\frac{\text{stratum size}}{\text{population size}}\times\text{total sample size}. \]
  • Quota sampling: the surveyor is given quotas, such as 20 men and 20 women over 60, and keeps interviewing until each quota is filled. The people are not chosen randomly, so bias is possible, but the sample matches the population on the quota characteristics.

Bias and reliability. A sample is biased if it systematically favours some members of the population over others, so it does not represent the population. Common causes are a poor choice of method (convenience), a sampling frame that leaves some people out (phoning only landlines), and non-response (only people with strong opinions reply). A larger sample reduces random variation but does not remove bias. The reliability of a source also depends on who collected the data, how, and why.

Outliers. An outlier is a value that lies far from the rest of the data. A standard rule uses the quartiles \(Q_1\), \(Q_3\) and the interquartile range \(\text{IQR}=Q_3-Q_1\). A value is an outlier if it is \[ \lt Q_1-1.5\times\text{IQR}\quad\text{or}\quad \gt Q_3+1.5\times\text{IQR}. \] Outliers may be real but unusual, or they may be mistakes. Decide what to do by looking at the context, not just the rule.

Definitions and formulae

Term or formulaMeaning / when to use
PopulationThe complete group being studied.
SampleThe part of the population from which data is collected.
Simple random sampleEvery member has an equal chance of selection.
Stratified sampleRandom samples from each subgroup, in proportion to subgroup size.
Systematic sampleEvery \(k\)th item from an ordered list after a random start.
Quota / convenience sampleNon-random methods; fast, but more likely to be biased.
\(\text{IQR}=Q_3-Q_1\)Spread of the middle half of the data.
Outlier fences: \(Q_1-1.5\,\text{IQR}\), \(Q_3+1.5\,\text{IQR}\)Values strictly outside these limits are outliers.

Worked examples

Example 1 A factory has 336 assembly workers, 294 packing workers and 210 office staff. A stratified sample of 40 workers is needed. How many should be chosen from each group?

Population size: \(336+294+210=840\).

Assembly: \(\dfrac{336}{840}\times40=16\).

Packing: \(\dfrac{294}{840}\times40=14\).

Office: \(\dfrac{210}{840}\times40=10\).

Check: \(16+14+10=40\).

Answer: 16 assembly, 14 packing, 10 office

Example 2 A gym owner wants to know whether members like the opening hours. She asks the first 30 people who leave the gym between 6 pm and 7 pm. (a) Name the sampling method. (b) Give one reason the result may be biased. (c) Suggest an improvement.

(a) The owner chose the people who were easiest to reach, so this is convenience sampling.

(b) Only people who train in the evening are asked. Early-morning and lunchtime members have no chance of being chosen, and they may care most about opening hours.

(c) Number all members on the membership list and choose 30 (or more) using a random number generator, which gives a simple random sample. A stratified sample by usual training time would also be suitable.

Answer: (a) convenience; (b) evening-only members, so some groups are excluded; (c) random selection from the full membership list

Example 3 The delivery times (in minutes) of 12 parcels are 12, 14, 15, 17, 18, 19, 21, 22, 24, 25, 27, 58. Use the quartile rule to decide whether any time is an outlier.

Enter the data in your GDC list and use the one-variable statistics feature to get the quartiles.

\(Q_1=16\) (median of the lower six values) and \(Q_3=24.5\) (median of the upper six values).

\(\text{IQR}=24.5-16=8.5\), so \(1.5\times\text{IQR}=12.75\).

Lower fence: \(16-12.75=3.25\). Upper fence: \(24.5+12.75=37.25\).

The smallest value, 12, is above 3.25. The largest, 58, is above 37.25, so it is an outlier. No other value is outside the fences.

Answer: 58 minutes is the only outlier

Common errors

  • Common error: calling a sample "random" just because the person chose it without thinking. A random method needs every member to have a known, equal chance of selection.
  • Common error: thinking a bigger sample always removes bias. A large convenience sample is still biased.
  • Common error: rounding stratified sample sizes carelessly so the total is wrong. Always add the strata sizes and compare with the required total.
  • Common error: using \(1.5\times\text{IQR}\) from the median or the mean instead of from \(Q_1\) and \(Q_3\).
  • Common error: automatically deleting an outlier. It might be a valid value, so say what you think caused it before removing it.

Exam tip: When asked about bias, name the group that is missed out and say why it matters to the question. A vague "it is not fair" does not explain the problem.

Check yourself

  1. A school has 540 junior, 420 middle and 240 senior students. A stratified sample of 60 is needed. How many come from each group?
    AnswerTotal 1200. Junior: \(\tfrac{540}{1200}\times60=27\). Middle: \(\tfrac{420}{1200}\times60=21\). Senior: \(\tfrac{240}{1200}\times60=12\). Check: \(27+21+12=60\).
  2. A data set has \(Q_1=20\) and \(Q_3=32\). Is 5 an outlier? Is 58 an outlier?
    Answer\(\text{IQR}=12\), so \(1.5\times12=18\). Lower fence \(20-18=2\); upper fence \(32+18=50\). 5 is above 2, so it is not an outlier. 58 is above 50, so it is an outlier.
  3. A researcher has an ordered list of 500 customers and wants a sample of 25 by systematic sampling. What is \(k\)?
    Answer\(k=\tfrac{500}{25}=20\). Pick a random starting customer from the first 20, then take every 20th customer after that.
  4. A radio station asks listeners to phone in with their opinion of a new song. Give one reason the results may be biased.
    AnswerOnly listeners who are tuned in and feel strongly enough to phone will respond (self-selection, non-response), so people with no strong feeling, or who are not listening, are left out.