impera Open Impera

IB Diploma Mathematics AA · Statistics and probability

Sampling and presenting data

1Populations and samples

The population is every member of the group you want to know about. A sample is the part you actually collect data from.

A good sample is representative: it reflects the whole population. A sample is biased if some members are more likely to be chosen than others.

Data can be:

  • Discrete: counted, taking separate values, such as the number of siblings.
  • Continuous: measured, taking any value in a range, such as height or time.

The reliability of data falls if the sample is small, the questions are leading, or people choose themselves.

Check yourself

Which of these is continuous data?

  • Shoe size in whole numbers

  • The number of pets in a home

  • The time to run 100 m

  • The number of goals scored

Show the answer

The time to run 100 m

Time is measured and can take any value.

2Sampling methods

  • Simple random: every member has an equal chance, and every possible sample is equally likely. Use random numbers.
  • Systematic: choose every $k$th member from a list, starting at a random point.
  • Stratified: split the population into groups (strata) and sample each group in proportion to its size.
  • Quota: fill a fixed number from each group, but not at random.
  • Convenience: use whoever is easiest to reach. Quick, but likely to be biased.
Worked example

A stratified sample

  1. A school has 300 juniors and 200 seniors. A sample of 40 is needed.
  2. Juniors: $\frac{300}{500} \times 40 = 24$.
  3. Seniors: $\frac{200}{500} \times 40 = 16$.
  4. Then choose 24 juniors and 16 seniors at random.
Check yourself

A sample uses every 10th name on a list, starting at a random point. Which method is this?

  • Systematic

  • Convenience

  • Quota

  • Stratified

Show the answer

Systematic

A fixed gap between choices is systematic sampling.

3Outliers

An outlier is a value far away from the rest. In IB, a value is an outlier if it is:

$$\text{below } Q_1 - 1.5 \times \text{IQR} \quad \text{or above } Q_3 + 1.5 \times \text{IQR}$$

where $\text{IQR} = Q_3 - Q_1$.

Do not simply delete outliers. Check whether they are errors (like a height of 17 m) or genuine unusual values.

Worked example

Testing for outliers

  1. $Q_1 = 20$, $Q_3 = 32$, so $\text{IQR} = 12$.
  2. Lower fence: $20 - 18 = 2$. Upper fence: $32 + 18 = 50$.
  3. A value of 55 is an outlier. A value of 3 is not.
Check yourself

Q₁ = 10 and Q₃ = 18. Above what value is a data point an outlier?

  • 28

  • 30

  • 36

  • 26

Show the answer

30

IQR = 8, and 18 + 1.5 × 8 = 30.

4Histograms, cumulative frequency and box plots

A cumulative frequency curve with the median and quartiles read off

  • A histogram shows grouped continuous data. In IB the bars have equal widths, and the height is the frequency.
  • A cumulative frequency graph plots the running total against the upper boundary of each class. Read off the median at $\frac{n}{2}$, $Q_1$ at $\frac{n}{4}$ and $Q_3$ at $\frac{3n}{4}$.
  • A box plot shows the minimum, $Q_1$, median, $Q_3$ and maximum. Outliers are shown as separate crosses.

Two box plots compared on the same scale

Box plots are good for comparing two sets of data. Compare a measure of centre (the medians) and a measure of spread (the IQRs).

Check yourself

On a cumulative frequency graph with n = 80, where do you read the median?

  • At a cumulative frequency of 20

  • At the highest point of the curve

  • At a cumulative frequency of 80

  • At a cumulative frequency of 40

Show the answer

At a cumulative frequency of 40

The median is halfway through the data, n/2.

5Bias in sampling

A sample is biased if some members of the population are more likely to be chosen than others.

  • Convenience sampling: asking people nearby may miss whole groups.
  • Self-selection: online polls attract people with strong views.
  • Non-response: people who refuse to answer may differ from those who do.
Example

The 1936 Literary Digest poll
The Literary Digest surveyed millions of people, many from telephone directories and car registrations, and predicted Alf Landon would beat Franklin Roosevelt. Roosevelt won by a landslide. Wealthier people were over-represented; a huge biased sample was worse than a small random one.

Check yourself

Why did the 1936 Literary Digest poll fail?

  • It surveyed too few people to be reliable

  • It used random sampling, which was biased

  • Roosevelt did not stand in that election

  • Its sample over-represented wealthier people

Show the answer

Its sample over-represented wealthier people

Bias beats size.

6Stratified sampling calculations

In stratified sampling, each group is represented in proportion to its size.

Worked example

A school of 1 200 students

  1. Year groups: 400, 300, 300, 200.
  2. Sample of 60.
  3. Year 1: $\frac{400}{1200} \times 60 = 20$.
  4. Years 2 and 3: $\frac{300}{1200} \times 60 = 15$ each.
  5. Year 4: $\frac{200}{1200} \times 60 = 10$.
  6. Check: $20 + 15 + 15 + 10 = 60$.
Check yourself

A group of 250 out of 1 000 people is stratified into a sample of 40. How many are chosen from it?

  • 10

  • 25

  • 4

  • 40

Show the answer

10

$\frac{250}{1000} \times 40$.

7Going deeper: stratified samples, outliers and estimates from grouped data

Worked example (stratified sample): a school has 240 students in Year 12 and 360 in Year 13. A stratified sample of 50 is needed.

  1. Total: 600.
  2. Year 12: $\frac{240}{600} \times 50 = 20$.
  3. Year 13: $\frac{360}{600} \times 50 = 30$.
  4. Within each year group, choose students at random.
  5. Advantage: each group is represented in proportion. Disadvantage: you need a full list of the population divided into strata.

Worked example (outliers): a data set has $Q_1 = 12$ and $Q_3 = 20$. Is 35 an outlier?

  1. $IQR = 20 - 12 = 8$.
  2. Lower fence: $Q_1 - 1.5 \times IQR = 12 - 12 = 0$.
  3. Upper fence: $Q_3 + 1.5 \times IQR = 20 + 12 = 32$.
  4. $35 > 32$, so 35 is an outlier.
  5. An outlier should be investigated. Remove it only if it is an error; a genuine extreme value is part of the data.

Worked example (grouped data): times in minutes: $0 \le t < 10$ frequency 5; $10 \le t < 20$ frequency 12; $20 \le t < 30$ frequency 8; $30 \le t < 40$ frequency 5.

  1. Use midpoints 5, 15, 25, 35.
  2. $\sum fx = 25 + 180 + 200 + 175 = 580$ and $n = 30$.
  3. Estimated mean: $\frac{580}{30} \approx 19.3$ minutes.
  4. Modal class: $10 \le t < 20$.
  5. Median: the 15th value. Cumulative frequencies are 5, 17, 25, 30, so it lies in $10 \le t < 20$. Reading a cumulative frequency curve at 15 gives about 18 minutes.
  6. These are estimates, because the individual values inside each class are unknown.

Choosing a sampling method

  • Simple random: every member has an equal chance. Unbiased, but needs a complete list.
  • Systematic: every $k$th member. Easy; biased if the list has a pattern with the same period.
  • Stratified: proportional random samples from each subgroup.
  • Quota: fill set numbers from each group without random selection. Quick; open to interviewer bias.
  • Convenience: whoever is easiest to reach. Cheap and usually unrepresentative.

Choosing a diagram and a measure

  • A histogram shows the shape of continuous data. A box plot compares groups quickly and shows outliers. A cumulative frequency curve gives medians, quartiles and percentiles.
  • With outliers or skew, use the median and IQR. For roughly symmetric data, use the mean and standard deviation.
  • If every value is multiplied by $a$ and increased by $b$, the mean becomes $a\bar{x} + b$ and the standard deviation becomes $|a|$ times the original.
Check yourself

A club has 320 junior and 480 senior members. In a stratified sample of 60, how many juniors are chosen?

  • 24

  • 36

  • 30

  • 20

Show the answer

24

320 ÷ 800 × 60 = 24.

Now test yourself

This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.

Practise in Impera