4.1 · SLPaper 1Paper 2

Sampling, data quality and outliers

28 min read

In a minute

Statistics is only as good as the data behind it. Here you learn the difference between a and a , how to choose a fair sample, and how to spot data you can't trust. You also meet the rule for an , and what to do when you find one.

You'll be able to

  • Use the words population, sample and , and tell from .
  • Judge whether a data source is reliable, and explain where , missing values and recording errors come from.
  • Use the 1.5×IQR1.5 \times \mathrm{IQR} rule to identify outliers, and decide whether each one is a valid value or an error.
  • Describe simple random, systematic, stratified, quota and convenience sampling, and judge how well each represents the population.
  • Work out how many members a stratified sample takes from each group.
Before you start3 quick questions on what this builds on
Check yourself
Find the mean of 77, 99, 44, 1212 and 88.
Check yourself
Write down the median of 33, 55, 77, 1010, 1111 and 1414.
Check yourself
In a club of 240240 members, 38\frac{3}{8} are juniors. How many juniors are there?

Populations, samples and types of data

A school wants to know how long its 12001200 students spend on homework. Asking all of them is slow. Asking 8080 is quicker, and gives a good estimate if the 8080 are chosen well.

You use the sample to estimate facts about the population. Collecting data from every member instead is called a census.

Watch for two traps. Shoe sizes are discrete: they jump from 77 to 7.57.5 to 88, with nothing in between. A height recorded as 162162 cm is still continuous: it was only rounded.

Worked exampleA cycling club records, for each member: (a) the number of races entered this season; (b) the time taken to ride 4040 km; (c) the number of gears on their bike; (d) their mass in kg. Classify each as discrete or continuous.

Try it first, then reveal one step at a time.

  1. Ask of each one: is it counted or measured?
Worked exampleAn orchard has 15001500 apple trees. The farmer inspects a random sample of 6060 trees and finds leaf disease on 99 of them. (a) State the population and the sample. (b) Estimate the number of diseased trees in the orchard.

Try it first, then reveal one step at a time.

  1. (a) The population is all 15001500 trees in the orchard. The sample is the 6060 trees inspected.
Check yourself
Which of these is continuous data?
Check yourself
A council wants to know what the 18 00018\,000 adults in a town think of a new bus route. It asks 400400 of them. What is the population?

Reliable data and bias

A large data set can still mislead. Check it for missing or impossible values too.

To judge a data source, ask who collected the data, and why. A firm that surveys people about its own product gains from a good result. Then ask how the data was collected. A source that doesn't say how its members were chosen is hard to trust.

Bias has three common causes. Part of the population may be out of reach: an online survey misses people without internet. People who volunteer choose themselves, and they often hold strong views. Some people don't reply, and they may differ from those who do.

A bigger sample doesn't remove bias. Asking 50005000 volunteers instead of 500500 still leaves out everyone who didn't volunteer.

Missing data: someone skips a question, or a sensor fails. Never record a blank as 00. Leave it out, and say how many values are missing.

Recording errors: a slipped decimal point, a wrong unit or a typing slip. Look for values that are impossible or far out of line. Correct one only if you know the true value; otherwise remove it and say so.

Worked exampleA farmer records the masses, in grams, of seven eggs: 58.258.2, 61.061.0, 5.975.97, 59.459.4, 62.362.3, 60.160.1, 57.857.8. (a) Identify the value that is most likely a recording error, and explain why. (b) That egg is weighed again: its mass is 59.759.7 g. Find the mean mass of the seven eggs. Give your answer to 3 s.f.

Try it first, then reveal one step at a time.

  1. (a) Six masses lie between 5757 and 6363 g. An egg of under 66 g is not realistic here, so 5.975.97 is almost certainly an error: the decimal point has slipped.
Worked exampleA gym has 20002000 members. To find out how often members train, the manager asks the 5050 people in the gym at 6 pm one Monday. Of these, 3838 say they train at least four times a week. (a) Use this sample to estimate how many members train at least four times a week. (b) Explain why your estimate is likely to be too high.

Try it first, then reveal one step at a time.

  1. (a) In the sample, 3850\frac{38}{50} train at least four times a week. Apply this to all members: 3850×2000=1520\frac{38}{50} \times 2000 = 1520.
Check yourself
A radio station asks listeners to phone in with their view of a new law. Of the callers, 85%85\% oppose it. What is the main problem with using this to judge public opinion?
Check yourself
A drinks company asks 300300 shoppers at its own factory shop which lemonade they like best. It reports that 72%72\% prefer its own brand. What is the main reason to doubt this source?
Check yourself
A weather sensor logs these noon temperatures, in °C: 14.214.2, 15.015.0, 00, 13.613.6, 14.814.8. The 00 is a missing reading: the sensor failed that day. Find the mean of the real readings.

Outliers

Look at these test scores: 5252, 5555, 5858, 6060, 6161, 6363, 9595. The 9595 sits far above the rest, but is it far enough to count as unusual? You need a rule that everyone applies the same way.

The rule uses the quartiles. With the data in order, the lower quartile Q1Q_{1} has a quarter of the values below it, and the upper quartile Q3Q_{3} has three quarters. You'll find them in 4.3; here they are given, or read from your GDC.

The (IQR) is the gap between the quartiles: the spread of the middle half of the data. It is in the formula booklet.

In the formula booklet
IQR=Q3−Q1\mathrm{IQR} = Q_{3} - Q_{1}

This rule is not in the booklet, so learn it. The two boundaries are called the lower and upper fences.

Learn this
lower fence=Q1−1.5×IQR,upper fence=Q3+1.5×IQR\text{lower fence} = Q_{1} - 1.5 \times \mathrm{IQR}, \qquad \text{upper fence} = Q_{3} + 1.5 \times \mathrm{IQR}
Number line with the box from Q1 to Q3, a distance of 1.5 times the IQR marked out on each side to the lower and upper fences, and the regions beyond the fences labelled outliers 1.5 × IQR IQR 1.5 × IQR Q1 Q3 lower fence upper fence outliers outliers
Measure 1.5×IQR1.5 \times \mathrm{IQR} out from the nearest quartile, never from the median.

The inequalities are strict. A value exactly equal to a fence is not an outlier.

Worked exampleFor a class's push-up scores, Q1=15Q_{1} = 15, the median is 2222 and Q3=27Q_{3} = 27. Every score is a whole number. Find the largest score that would not be an outlier.

Try it first, then reveal one step at a time.

  1. Find the IQR: 27−15=1227 - 15 = 12, so 1.5×IQR=181.5 \times \mathrm{IQR} = 18.

The rule only flags a value as unusual; it doesn't make it wrong. Check each outlier against the context.

If the value is possible, it is a valid member of the : keep it. If it is impossible, or clearly a slip, it is an error: correct it if you know the true value, or remove it and say so.

Worked exampleThe times, in seconds, for 1111 students to solve a puzzle are 4242, 3838, 5151, 4545, 4747, 4040, 112112, 4444, 4949, 3636, 4646. (a) Use your calculator to find Q1Q_{1} and Q3Q_{3}. (b) Hence identify any outliers. (c) State, with a reason, whether the outlier should be removed.

Try it first, then reveal one step at a time.

  1. (a) Enter the times in a list and run one-variable statistics. Write down what you read off: Q1=40Q_{1} = 40 and Q3=49Q_{3} = 49.
Check yourself
For the test scores at the start of this section, Q1=55Q_{1} = 55 and Q3=63Q_{3} = 63. Find the upper fence.
Check yourself
The ages of the members of a chess club have Q1=14Q_{1} = 14 and Q3=19Q_{3} = 19. Two of the recorded ages are 6767 and 145145. Which statement is correct?

Sampling methods

The five methods below differ in how random they are, and in what you need before you start. Most need a numbered list of the whole .

Effectiveness: no sampling bias, but it needs a full list, and by chance it can miss a small group.

Effectiveness: quick and evenly spread. It goes wrong if the list has a repeating pattern that lines up with kk.

Learn this
number from a stratum=size of stratumsize of population×sample size\text{number from a stratum} = \frac{\text{size of stratum}}{\text{size of population}} \times \text{sample size}

Effectiveness: usually the most representative method. It needs each stratum's size and a list of its members.

Effectiveness: quick and needs no list, so it suits street surveys. The collector's choices can bias it, for example by approaching only people who look friendly.

Effectiveness: the quickest and cheapest method, but the most likely to be biased.

Worked exampleA factory has 212212 workers on the day shift, 158158 on the evening shift and 9494 on the night shift. A stratified sample of 5050 workers is chosen. Find the number of workers to choose from each shift.

Try it first, then reveal one step at a time.

  1. Total workers: 212+158+94=464212 + 158 + 94 = 464.

Rounding each share to the nearest whole number can give the wrong total. A safe method is to round every share down, then hand out the places still missing. Give them one each to the strata with the largest decimal parts. No stratum can go negative, and the total always comes out right.

If two decimal parts tie for the last place, choose between those strata at random. For 33 equal strata and a sample of 1010, each share is 3.33…3.33\ldots. Rounding down gives 3+3+3=93 + 3 + 3 = 9, so one stratum, chosen at random, gets the tenth place.

Worked exampleA bakery makes 13501350 loaves in a day, numbered 11 to 13501350 as they leave the oven. An inspector weighs a systematic sample of 4545 loaves. (a) Find the sampling interval kk. (b) Describe how to choose the sample. (c) The random start is loaf 1717. Find tt, the number of the last loaf chosen.

Try it first, then reveal one step at a time.

  1. (a) k=Nn=135045=30k = \frac{N}{n} = \frac{1350}{45} = 30.
Check yourself
A researcher stands in a shopping centre and interviews passers-by until she has spoken to 3030 men and 3030 women. Which sampling method is this?
Check yourself
A college has 10801080 students, of whom 432432 are in Year 1. A stratified sample of 7575 students is taken. How many Year 1 students are in the sample?
Check yourself
A hospital has a full list of its staff. It wants a random sample that represents nurses, doctors and office staff in the right proportions. Which method is best?

Common mistakes

  • Calling a value that equals a fence an outlier. The inequalities are strict, so a value on the fence is not an outlier.
  • Adding 1.5×IQR1.5 \times \mathrm{IQR} to the median. Measure from Q3Q_{3} for the upper fence and from Q1Q_{1} for the lower one.
  • Saying only that a sample is too small or not representative. Name the group the method favours, and say why its answers would differ.
  • Calling the first few people to arrive a systematic sample. That is convenience sampling; systematic takes every kkth member of an ordered list.
  • Dividing by the sample size in stratified sampling. Each stratum's fraction is its size over the population size.
  • Deleting an outlier just because it is one. Remove a value only if it is impossible or a known error.

Exam tips

  • State or identify a sampling method: the name is enough. Describe one: say how members are picked; for systematic sampling, give kk and the random start.
  • Explain why a sample is biased: the mark needs a reason tied to the context, such as who is left out and why they would answer differently.
  • Verify that a value is or is not an outlier: write the fence with numbers substituted, then compare the value with it using << or >>.
  • Estimate a population count from a sample: write the fraction you scale by, such as 3850×2000\frac{38}{50} \times 2000, for the method mark.

Key takeaways

In bookletIQR=Q3−Q1\mathrm{IQR} = Q_{3} - Q_{1}
Learn thislower fence=Q1−1.5×IQR,upper fence=Q3+1.5×IQR\text{lower fence} = Q_{1} - 1.5 \times \mathrm{IQR}, \qquad \text{upper fence} = Q_{3} + 1.5 \times \mathrm{IQR}
Learn thisnumber from a stratum=size of stratumsize of population×sample size\text{number from a stratum} = \frac{\text{size of stratum}}{\text{size of population}} \times \text{sample size}
Learn thisThe population is the whole group; a sample is the part you collect data from. Counted data is discrete; measured data is continuous.
Learn thisA sample is biased if the way it is chosen favours some members. Say who is favoured and why.
Learn thisLeave missing values out, never record them as 00. Correct a recording error only if you know the true value.
Learn thisoutlier: x<Q1−1.5×IQRorx>Q3+1.5×IQR\text{outlier: } x < Q_{1} - 1.5 \times \mathrm{IQR} \quad \text{or} \quad x > Q_{3} + 1.5 \times \mathrm{IQR}
Learn thisA value equal to a fence is not an outlier. Keep valid outliers; remove only errors.
Learn thisSimple random: every sample equally likely. Systematic: every kkth, k=Nnk = \frac{N}{n}, random start. Stratified: random within groups, in proportion. Quota: fixed numbers, collector chooses. Convenience: easiest to reach.

Practise this

2 past-paper questions on 4.1 in the AA HL bank, each with a mark scheme and a worked explanation.

Practise 4.1 →