Educerie · IB Diploma · Mathematics: analysis and approaches
IB Mathematics AA 4.1 · SL and HL
Populations, samples and sampling
Before you calculate anything from a set of data, how do you decide whether the data deserve to be trusted?
What you will learn
- Know what a population, a sample and a random sample are, and tell discrete from continuous data
- Understand how sampling methods and data sources lead to bias, and why a bigger sample does not cure it
- Know how to handle missing values and recording errors, and how to report what was done
- Know the 1.5 × IQR outlier rule and understand when an outlier is genuine and when it is an error
You must be able to
- Determine whether a value is an outlier, showing both fences and the comparison
- Calculate how many to take from each group in a stratified sample
- Identify a sampling technique from a description and describe how to carry one out
- Explain why a sample may be biased, naming the group missed and the effect on the result
- State whether data are discrete or continuous, with a reason
- Decide whether an outlier or recorded value should be kept, corrected or removed, in context
In the exam. Paper 1 and Paper 2, almost always as the opening parts of a longer statistics question: classify the data (1 mark), name or describe a sampling technique (1 to 2 marks), work out the numbers in a stratified sample (2 to 3 marks), test a value for being an outlier (3 to 4 marks) and say whether it should stay (1 to 2 marks). The outlier test with given quartiles is Paper 1 arithmetic; with raw data it is usually Paper 2, with the quartiles from your GDC. The same ideas decide whether the data in your exploration are fit to use.
1Population, sample and census
- The population = the whole collection of people or things the question is about.
- The question fixes it, not your convenience.
- Example: a bakery chain wants to know how long customers queue. The population is every customer of the chain, not the lunchtime crowd at one shop.
- Write it as who, where, when.
- A census = measuring every member. It is rarely sensible: it can cost too much or take too long.
- Some tests wreck what they measure. A car maker that crash-tested every car would have none left to sell.
- So we take a sample = a subset of the population, used to estimate the same quantity for the whole population. Figure 1 shows the trade.
- A random sample = members picked by a chance process, so every member of the population is equally likely to be picked.
- Randomness matters because human choice lets taste leak in.
- Example: a teacher told to "pick a few typical pupils" reaches for the ones she remembers, and they are not typical.
- A random sample can still be unlucky. It promises only that any mismatch is chance, not a built-in lean. The chance mismatch tends to shrink as the sample grows.
- Sampling error = the chance gap between what the sample shows and the truth for the whole population.
- Non-sampling error = a human mistake, such as mis-typing a value. It can happen in a census too.
- To pick at random from a list, you need a sampling frame = a list holding every member of the population once.
- Number the list. Let a random number generator choose numbers, discarding repeats. A frame that leaves people out is a first source of bias (section 4).
- Exam convention: at SL, the data set in a question is the population unless the question says otherwise.
- This matters in 4.3. Your GDC offers two standard deviations, and you must choose the right one.
2Discrete and continuous data
- Discrete data = separate, particular values, usually because they are counted: goals in a match, books on a shelf, tickets sold.
- Shoe sizes (, , ) are discrete too, although not whole numbers. Nothing exists between size and size .
- Continuous data = measured, and can take any value in a range: time, mass, length, temperature.
- What you record is rounded to the precision of the instrument.
- Example: a time written as really means "somewhere from up to ". Figure 2 sets the two side by side.
- Decide by the quantity, not by how the numbers look. The test: between any two possible values, is another always possible? If so, the data are continuous.
- Decimals, still discrete. A price in dollars and cents.
- Whole numbers, still continuous. A height rounded to the nearest centimetre.
- Two cases need a sentence of judgement:
- Age. It is continuous (you are older every second), but "age in completed years" behaves like counted data.
- Money. It moves in cents and is strictly discrete. Large sums such as company profits are usually treated as continuous.
- If a question hinges on it, say which you are assuming and why.
- In an answer, give the reason: "continuous, because it is measured", "discrete, because it is counted". The choice decides how data are shown later: continuous data go into class intervals such as with no gaps (4.2).
3Five ways to choose a sample
Invented setting: the Harbour Library has 600 registered members: 240 children, 270 adults and 90 retired members. The librarian wants the views of 40 of them on later opening hours.
- Convenience sampling = ask whoever is easiest to reach.
- Example: the first 40 members in on Saturday morning.
- It is quick and nearly free, and the weakest method. People who are easy to reach share habits. The unusual members are not at hand.
- Simple random sampling = number the members 1 to 600 and let a random number generator choose 40 different numbers. Every possible group of 40 is equally likely.
- It needs a complete list. An unlucky draw can miss a small group such as the retired members.
Systematic sampling = take every th member of an ordered list, from a random start. Here
- A stated fraction gives the interval by its reciprocal: a 4% sample takes every 25th. If the division is not exact, round and accept a sample size close to the target.
- Fast and even. It spreads the sample through the list.
- No full list needed. It works when members turn up one at a time, such as cars passing a toll gate.
- Its weak point is a list that repeats in a cycle.
- Example: names come in pages of 15, each headed by a committee member. A start of 1 picks only committee members.
- Only the start is random, so it is not a simple random sample. Members 8 and 9 can never both be chosen.
- Stratified sampling = split the population into strata, then take a random sample from each stratum, in proportion to its size.
- Strata are non-overlapping groups that might answer differently. Here they are the three member types.
- Inside each stratum the members are picked at random. The general line is (stratum size population size) sample size.
- When the answers are not whole numbers, round, then check the total.
- Example: a call centre with 350 day staff and 230 night staff, sampled at 30, gives and . That is and , total .
- If rounding leaves the total one short or one over, adjust the stratum whose decimal part was nearest to a half, and say so.
- Stratifying works best when members of a stratum resemble each other and the strata differ from each other. Every group appears in its true share, so it:
- usually gives a smaller sampling error than a simple random sample of the same size.
- lets you compare the groups.
- Its price is information. You must know each member's group and each group's size.
- Quota sampling = the collector is told how many to find in each group (16 children, 18 adults, 6 retired members). Each quota is filled with whoever is available.
- It looks like stratified sampling. The difference is the whole point. Within each group the people are not chosen at random.
- Example: the adults in the library at ten on a Tuesday morning are not typical adults.
- It is quick and needs no list. But the collector's choices let bias in.
Figures 3 and 4 show all five methods on one group of 40, with 10 chosen.
4Judging a method, and bias
A method is effective = likely to give a sample that represents the population, at a cost you can bear.
| Method | Chosen by chance? | Needs a full list? | Groups in true proportion? | Main risk |
|---|---|---|---|---|
| Simple random | yes | yes | only on average | a small group missed by bad luck |
| Systematic | only the start | an ordered list or a stream | only on average | a cycle in the list |
| Stratified | yes, within strata | yes, with each member's group | yes | needs detailed information; more work |
| Quota | no | no | yes, by design | the collector's choices |
| Convenience | no | no | no | people who are easy to reach are not typical |
When a question says "comment on" a method or asks for an improvement, give three things:
- the flaw.
- the direction it could push the result.
- a random method that would remove it.
- Bias = a systematic lean of the sample away from the population in one direction.
- It is not bad luck, so a bigger sample does not cure it. A biased method used on 10,000 people gives a very precise wrong answer.
- Size does matter for chance error. Five households, however chosen, are too few to speak for a town: one unusual household moves the result a long way.
The usual sources of bias:
- Selection bias. The frame leaves groups out. An email-only survey cannot reach people with no email.
- Non-response bias. Those who reply differ from those who do not. Long forms are filled in mostly by people with time, or strong feelings.
- Self-selection. Volunteers choose themselves, so a phone-in poll hears from people with a strong view.
- Response bias. The wording or setting steers the answer. "Don't you agree the car park fees are far too high?" invites yes. People overstate how often they exercise.
- The guide points to real cases worth looking up, each a sample that did not represent its population:
- the Literary Digest and George Gallup polls for the 1936 US presidential election.
- Google's flu predictor.
- Boston's pot-hole app.
- the Kinsey reports.
- Example (invented): before a mayoral election in the made-up town of Varnholm, the Varnholm Courier prints a voting coupon. It gets 40,000 back, 68% for candidate P.
- A polling firm asks 800 voters picked at random from the electoral roll. It finds candidate Q ahead, and Q wins.
- The coupons came from readers who chose to reply. The paper's readers were older and better off than the town. So 40,000 replies gave a very precise wrong answer: plenty of data, still not representative.
A source is reliable = its figures can be trusted to describe what they claim, and a repeat of the collection would give similar results. Figure 5 lists questions to put to any data set, in an exam or a newspaper.
5Missing data and errors in recording
Real data have gaps and slips. Two rules cover almost everything.
A missing value is left out, never written as 0. An impossible or clearly mistyped value is corrected from the original record if you can, removed if you cannot, and you say what you did.
- Example: a botany student measures the heights of ten seedlings, in cm: .
- The belongs to a pot where nothing germinated, so there is nothing to measure.
- The is impossible for a seedling. The lab book shows , so the decimal point was missed.
- The raw mean of describes no seedling in the tray. The cleaned mean is honest if you say that fell from 10 to 9, and why.
- Never repair a value by guessing. Had the lab book been lost, remove the ; do not invent .
- A few gaps in a large data set do little harm. When many values are missing, the members behind them may differ from the rest (the non-response problem again), and the conclusion is shaky.
6Outliers: the rule, then the judgement
- An outlier = a data item more than from the nearest quartile.
- The interquartile range is the width of the middle half of the data.
is an outlier if or .
The two limits are the fences. Everything between them is ordinary. A value exactly on a fence is not an outlier: the rule says more than.
Worked example (raw data, invented): fifteen employees of a small firm record their commuting times in minutes:
- With the median is the 8th value, .
- is the median of the seven values below it, of the seven above. Most GDCs use this method.
Figure 6 draws the fences. They are measured from the quartiles, not from the median.
- Judgement: the rule says a value is unusual, not what to do.
- A valid outlier is a genuine member of the population. The 58-minute commuter probably lives in the next town. Deleting that person would make the firm's commutes look shorter than they are, so keep the value and mention it.
- An error cannot be true, or has an obvious recording explanation: 580 minutes, a height of , a mass typed in grams among kilograms. Correct it from the source, or remove it and say so.
- When the question says "justify", write the comparison with the fence, then the sentence about context.
- Working backwards: the exam sometimes gives the IQR, says there are no outliers, and asks for a least or greatest possible quartile. Write the fence as an inequality and solve it.
- Example: if and the largest value is , no outlier means , so .
- The largest value that is not an outlier is the fence itself. With and it is , not . At the low end: .
- Why it matters: outliers drag some summaries more than others. With the , the commuting mean is minutes. Without it, . The median moves only from to .
- You use this in 4.3 when choosing which average to quote. In 4.2, a box-and-whisker diagram marks each outlier with a cross.
In exam words: a Paper 1 version gives and and asks:
- (a) Show that 58 is an outlier. 2 marks
- (b) Interpret the effect of this value on the mean. 1 mark
- (b) The 58 pulls the mean up, from to minutes. The median hardly moves. So the mean overstates a typical commute, and the median describes it better.
- In a "show that" the conclusion is printed. The marks are for the fence and the written comparison, so give both.
7Putting it together: one question, start to finish
Exam stems stack these skills. A museum has 1,200 on its mailing list: 840 regular visitors and 360 students. It wants a sample of 48.
- Systematic: . Use a random start between 1 and 25, say 9. Then take every 25th name: , the last being . Say the start is random and the step is fixed.
- Stratified by group: and , so and . Check: .
- Comment: the systematic sample does not guarantee that students appear in their true share. A stratified sample does, provided the museum knows each person's group.
- If the replies show a visit time of 9 hours, test it against the fences. Then ask whether a visitor could really stay 9 hours, or whether the answer was typed in minutes.
Practice questions
26 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.