Skip to content
IB Diploma ProgrammeSL & HL

Sampling and types of data

Mathematics: Analysis and Approaches SL & HL Chapter Notes

Last updated November 2026

ShareWhatsAppPost

Sampling and types of data notes as a printable PDF.

Read online free. Download a watermarked copy with a free account.

Read the notes

The full Sampling and types of data notes as text: skim, search, and jump between subtopics.

~14 min read

1. Population, sample and types of data

The population is the whole group you want to know about. A sample is the part of it you actually collect data from. A random sample is one where every member of the population has an equal chance of being chosen.

Data are discrete if they take separate values, usually found by counting, such as a number of siblings. Data are continuous if they can take any value in an interval, usually found by measuring, such as a height.

When you meet a data set, ask four things. Who is the population? How was the sample chosen? Is each variable discrete or continuous? Can the data be trusted?

Worked example 14 marks

A researcher chooses 50 students at random from a school of 900 students. For each student she records the number of siblings and the height. State the population and the sample. Explain whether each of the two variables is discrete or continuous.

  1. 1

    population: all 900 students in the school (A1) [1]

  2. 2

    sample: the 50 students chosen (A1) [1]

  3. 3

    number of siblings is discrete, because it is counted in whole numbers (R1) [1]

  4. 4

    height is continuous, because it is measured and can take any value in an interval (R1) [1]

2. Reliable sources and bias

A data source is reliable when its data are accurate, and when it can be trusted to represent the population. A sample is biased when it systematically favours some members of the population over others, so it does not represent the population.

Bias often comes from how people are chosen. A sample of people who choose to reply is self-selected. People with strong views reply more often than people with none.

Check the data too. A value may be missing, or recorded wrongly. Say how you deal with it: leave out the missing value and state that you did, or correct an error when the true value is known. A conclusion drawn from a biased sample cannot be applied to the whole population.

Worked example 13 marks

A newspaper invites its readers to complete an online questionnaire about the local library. There are 120 replies and 90% are in favour of closing it. The editor writes that 90% of the town's residents want the library closed. Explain why the editor's conclusion is not reliable.

  1. 1

    the population is all residents, but the sample is only readers who chose to reply (A1) [1]

  2. 2

    people with strong views are more likely to reply, so the sample is biased (R1) [1]

  3. 3

    the sample is not representative of the population, so the 90% cannot be applied to all residents (A1) [1]

3. Simple random, systematic and convenience sampling

In simple random sampling every member of the population has an equal chance of being chosen, and so does every group of the same size. A random number generator can be used to pick them.

In systematic sampling you list the population, choose a random starting point, then take every kth member. Find k by dividing the population size by the sample size.

In convenience sampling you choose whoever is easiest to reach. It is quick and cheap, but it is not random and it is often biased.

k = (population size)/(sample size)

Worked example 13 marks

A school keeps a list of its 500 students, numbered 1 to 500. Describe how to choose a systematic sample of 25 students from the list.

  1. 1

    interval: 500 ÷ 25 = 20, so take every 20th student (A1) [1]

  2. 2

    choose a random starting point from the first 20 students on the list (M1) [1]

  3. 3

    select that student and then every 20th student after, giving 25 students (A1) [1]

4. Stratified and quota sampling

In stratified sampling the population is split into groups, called strata, such as year groups. The sample has the same proportion from each stratum as the population has. Members are then chosen at random within each stratum.

In quota sampling the sample is also built from groups in the proportions of the population, but the interviewer chooses who to ask until each quota is full. It is not random, so it can still be biased.

For each stratum, multiply its proportion of the population by the sample size.

number from a stratum = (stratum size)/(population size) × sample size

Worked example 12 marks

A school has 600 students across four grade levels, given in the table. A group of 60 students was surveyed using a stratified sampling technique, such that each grade in the sample was proportional to the population. Each student was asked how much allowance, in Singapore dollars, they received per week.(a) Find the number of Grade 12 students in the sample.

GradeNumber of students
9115
10178
11137
12170
  1. 1

    attempt to find the correct proportion of Grade 12 students in the sample: 170/600 × 60 (M1) [1]

  2. 2

    number of Grade 12 students = 17 (A1) [1]

5. Outliers and the 1.5 × IQR rule

An outlier is a data item which is more than 1.5 × the interquartile range (IQR) from the nearest quartile. The IQR is the upper quartile minus the lower quartile.

So a value is an outlier if it is less than the lower fence or greater than the upper fence. A value equal to a fence is not an outlier.

IQR = Q₃ - Q₁

lower fence = Q₁ - 1.5 × IQR

upper fence = Q₃ + 1.5 × IQR

Worked example 12 marks

The results of a survey of the weekly allowances of 60 students are summarized in the following box and whisker diagram. The interquartile range is 24 Singapore dollars. An outlier is a value that is less than Q₁ - 1.5 × IQR or greater than Q₃ + 1.5 × IQR.(d) Determine the smallest possible allowance, from the sample, that is not an outlier.

  1. 1

    attempt to use the outlier formula: Q₁ - 1.5 × IQR = 66 - 1.5 × 24 (M1) [1]

  2. 2

    smallest amount is 30 Singapore dollars (A1) [1]

  3. 3

    The markscheme gives M1A0 if 30 is then called an outlier, or the final answer is not 30 (usually 31). An outlier is less than 30, so 30 is not one.

6. Interpreting outliers in context

Finding an outlier is not the end. Ask why it is there. In context, some outliers are a valid part of the sample, such as a genuinely very tall person. Some outlying items are an error in the sample, such as a decimal point in the wrong place.

If the value is impossible, or is known to be a recording error, correct it or leave it out and say so. If it is valid, keep it. Never remove a value only because it is far from the others.

Outliers link to box and whisker diagrams (SL 4.2) and to measures of dispersion (SL 4.3).

Worked example 14 marks

A teacher records the times, in seconds, that students take to run 100 m. The quartiles of the times are Q₁ = 13.6 and Q₃ = 14.5. One student's time is recorded as 1.47 seconds. Show that 1.47 is an outlier and suggest a reason for it.

  1. 1

    IQR = 14.5 - 13.6 = 0.9 and attempt to use the outlier formula: 13.6 - 1.5 × 0.9 (M1) [1]

  2. 2

    lower fence = 12.25 (A1) [1]

  3. 3

    1.47 < 12.25, so 1.47 is an outlier (R1) [1]

  4. 4

    a time of 1.47 s for 100 m is impossible, so it is likely a recording error (decimal point misplaced, 14.7): correct or leave out (R1) [1]

Recap

  • Population is the whole group. A sample is the part you collect from. Random means equal chance for every member.
  • Discrete data are counted. Continuous data are measured.
  • A sample is biased if it favours some members. Self-selected samples are often biased.
  • Systematic: k = population ÷ sample, random start, then every kth. Convenience is not random.
  • Stratified: stratum size ÷ population × sample size. Quota: the interviewer chooses, so not random.
  • Outlier: below Q₁ - 1.5 × IQR or above Q₃ + 1.5 × IQR. A value on the fence is not an outlier.
  • Decide in context if an outlier is valid or an error. Say what you do with it.

End-of-chapter exercise

Test yourself on the whole chapter. Work through these before moving on.

  1. State whether the number of goals scored in a football match is discrete data or continuous data.1 mark
    Answer
    1. discrete (A1)

    Trap: Goals are counted in whole numbers. Data that are measured, like time, are continuous.

  2. A shop owner asks the first 40 customers who enter the shop on a Saturday morning about the opening hours. State the name of this sampling technique and explain one reason why the sample may be biased.2 marks
    Answer
    1. convenience sampling (A1)
    2. customers who shop on Saturday mornings may not represent those who shop on weekdays or evenings, so the sample is not representative (R1)

    Trap: Saying only 'the sample is too small' gives a different problem. Size is not the same as bias.

  3. Do not use a calculator. A list has 800 students. A systematic sample of 50 students is taken. The first student chosen is number 7 on the list. Find the number of the fourth student chosen.3 marks
    Answer
    1. interval = 800 ÷ 50 = 16 (A1)
    2. fourth student = 7 + 3 × 16 (M1)
    3. = 55 (A1)

    Trap: The fourth student is three steps after the first. Using 7 + 4 × 16 = 71 counts one step too many.

  4. Do not use a calculator. A school has 840 students: 210 in Year 7, 252 in Year 8 and 378 in Year 9. A stratified sample of 40 students is taken. Determine the number of students from each year group.3 marks
    Answer
    1. sample fraction = 40/840 = 1/21 (M1)
    2. Year 7: 210 ÷ 21 = 10, Year 8: 252 ÷ 21 = 12 (A1)
    3. Year 9: 378 ÷ 21 = 18. Check: 10 + 12 + 18 = 40 (A1)

    Trap: A stratified sample is proportional. Taking the same number from each year group is a different method.

  5. Do not use a calculator. A data set has lower quartile 24 and upper quartile 40. Determine whether the value 65 is an outlier.3 marks
    Answer
    1. IQR = 40 - 24 = 16 (A1)
    2. upper fence = 40 + 1.5 × 16 = 64 (M1)
    3. 65 > 64, so 65 is an outlier (A1)

    Trap: Measure from the nearest quartile, here Q₃. Using 1.5 times Q₃ or the median gives the wrong fence.

  6. A council wants to know whether residents support a new bus route. It asks 200 people at the bus station on a weekday morning. (a) State the population. [1] (b) Explain why the sample is biased. [2]3 marks
    Answer
    1. (a)
    2. all residents of the council area (A1)
    3. (b)
    4. people at a bus station are mostly bus users, who may favour the route, and other residents are left out (R1)
    5. a weekday morning excludes people who are at work or travel at other times, so the sample is not representative (R1)

    Trap: The population is all the residents, not the 200 people. The 200 are the sample.

  7. A town has 4000 residents: 1500 aged under 30, 1700 aged 30 to 59 and 800 aged 60 or over. An interviewer carries out a quota sample of 80 residents in these proportions. (a) Calculate the number of residents in each quota. [3] (b) State one reason why a quota sample is not a random sample. [1]4 marks
    Answer
    1. (a)
    2. 1500 ÷ 4000 × 80 (M1)
    3. under 30: 30, 30 to 59: 34 (A1)
    4. 60 or over: 16 (A1)
    5. (b)
    6. the interviewer chooses who to ask, so not every resident has an equal chance (R1)

    Trap: Matching the proportions does not make a quota sample random: the interviewer still chooses who to ask.

  8. A student records the hours of sleep that eight people had last night: 6, 7, 7, 7, 8, 8, 9 and 70. The quartiles are Q₁ = 7 and Q₃ = 8.5. Determine whether 70 is an outlier and state what should be done with it.4 marks
    Answer
    1. IQR = 8.5 - 7 = 1.5 (A1)
    2. upper fence = 8.5 + 1.5 × 1.5 = 10.75 (M1)
    3. 70 > 10.75, so 70 is an outlier (A1)
    4. 70 hours is more than a day, so it must be a recording error (probably 7.0). Correct it or leave it out and say so (R1)

    Trap: Do not remove an outlier just because it is far away. Here it is removed for a reason: 70 hours of sleep is impossible.

  9. Do not use a calculator. The daily numbers of complaints to a company over 80 days have minimum 3, lower quartile 22, median 30, maximum 71 and interquartile range 18. (a) Write down the upper quartile. [1] (b) Determine the largest possible number of complaints, from the sample, that is not an outlier. [2] (c) Determine whether the minimum and the maximum are outliers. [2]5 marks
    Answer
    1. (a)
    2. Q₃ = 22 + 18 = 40 (A1)
    3. (b)
    4. upper fence = 40 + 1.5 × 18 = 40 + 27 (M1)
    5. largest number that is not an outlier = 67 (A1)
    6. (c)
    7. lower fence = 22 - 27 = -5 (M1)
    8. 3 > -5, so the minimum is not an outlier; 71 > 67, so the maximum is an outlier (A1)

    Trap: 67 equals the fence, so it is not an outlier: calling it one, or answering 66 or 68, is the slip the markscheme marks M1A0.

  10. Do not use a calculator. A factory has 120 day-shift, 90 evening-shift and 60 night-shift workers. A stratified sample of 36 workers is timed doing a task. (a) Determine the number from each shift in the sample. [3] The times have lower quartile 15 minutes, and 45 minutes lies exactly on the upper fence. (b) Show that the upper quartile is 27 minutes. [3] (c) One time is recorded as 4.5 minutes. Determine whether it is an outlier, and suggest why it should still be checked. [3]9 marks
    Answer
    1. (a)
    2. total = 120 + 90 + 60 = 270; 120/270 × 36 = 4/9 × 36 (M1)
    3. day: 16, evening: 90/270 × 36 = 12 (A1)
    4. night: 60/270 × 36 = 8. Check: 16 + 12 + 8 = 36 (A1)
    5. (b)
    6. IQR = Q₃ - 15, so Q₃ + 1.5(Q₃ - 15) = 45 (M1)
    7. 2.5Q₃ - 22.5 = 45 (A1)
    8. 2.5Q₃ = 67.5 (A1)
    9. Q₃ = 27 (AG)
    10. (c)
    11. IQR = 27 - 15 = 12, lower fence = 15 - 1.5 × 12 = -3 (M1)
    12. 4.5 > -3, so 4.5 is not an outlier (A1)
    13. 4.5 is far below the lower quartile of 15 and may be 45 with the decimal point misplaced, an error in the recording of data; passing the outlier test does not prove a value is correct (R1)

    Trap: Working with 1.5 × Q₃ instead of 1.5 × IQR, and treating a value that is not an outlier as if it must be correct.

Say this, not that

Wording that loses the mark, against the wording the mark scheme credits.

Loses the markGets the mark
The smallest allowance that is not an outlier is 3130. The markscheme gives M1A0 for any final answer other than 30
Find 30, then state that 30 is an outlier30 equals the fence. An outlier is less than Q₁ - 1.5 × IQR, so 30 is not an outlier
An outlier is more than 1.5 × IQR from the medianMore than 1.5 × IQR from the nearest quartile
Delete the outlier because it is far from the restIn context some outliers are a valid part of the sample. Remove one only if it is an error

Frequently asked questions

What is the difference between discrete and continuous data?
Discrete data take separate values and are usually found by counting, such as a number of siblings. Continuous data can take any value in an interval and are usually found by measuring, such as a height. Ask whether the variable is counted in whole numbers or measured.
What is a random sample, and why can a sample be biased?
A random sample is one where every member of the population has an equal chance of being chosen. A sample is biased when it systematically favours some members of the population over others, so it does not represent the population. A self-selected sample, such as people who choose to reply, is often biased because people with strong views reply more often.
How do you choose a systematic sample?
List the population, choose a random starting point, then take every kth member, where k = (population size)/(sample size). For a list of 500 students and a sample of 25, 500 ÷ 25 = 20, so take every 20th student. Convenience sampling is different: it chooses whoever is easiest to reach, so it is not random.
How do you work out how many people to take from each stratum?
Use (stratum size)/(population size) × sample size for each stratum. In the note's example, Grade 12 has 170 of 600 students, so 170/600 × 60 = 17 students are in the sample. Check that the numbers from all the strata add up to the sample size.
How do you use the 1.5 × IQR rule to decide whether a value is an outlier?
Find the IQR as Q₃ - Q₁, then the lower fence Q₁ - 1.5 × IQR and the upper fence Q₃ + 1.5 × IQR. A value is an outlier only if it is less than the lower fence or greater than the upper fence, so a value equal to a fence is not one. For example, with Q₁ = 24 and Q₃ = 40, the IQR is 16 and the upper fence is 64, so 65 is an outlier.
Should you delete an outlier from a data set?
No, not just because it is far from the others. In context, some outliers are a valid part of the sample, so keep them. Remove a value only if it is an error, such as a recording error, and state that you have done so. A value that is impossible, such as 70 hours of sleep, can be corrected or left out.

Free notes are just the start.

Unlock every Workbook and Chapter at a Glance, and generate your own worksheets and predicted papers.

Explore plans

Related chapters