# Data types, sampling, bias

> IB Mathematics: Applications and Interpretation HL · Unit 5: Statistics and probability
> Source: https://www.owlsprep.com/study/ib-math-ai-hl-u5-data-types-sampling-bias/

This sub-topic covers foundational statistical concepts: classifying different data types, common methods for sampling from a population, and how to identify and avoid sampling bias, critical for all further statistical analysis.

**Prerequisites:** Basic understanding of numerical data and statistical studies

## Learning objectives

- Distinguish between qualitative, quantitative discrete, and quantitative continuous data
- Describe common sampling methods and their appropriate use cases
- Identify different types of sampling bias in study design
- Evaluate whether a sampling method produces a representative sample
- Distinguish reliability from validity and describe test-retest, parallel forms, content and criterion-related validity tests
- Adjust the degrees of freedom of a chi-squared goodness-of-fit test when parameters are estimated from the data

## Classifying Data Types

**Data Classification** — All statistical data is classified by type, which determines what analysis can be performed. Data is first split into qualitative (categorical) and quantitative (numerical). Quantitative data is further split into discrete (countable) and continuous (measurable).

*Example:* Eye color = qualitative, number of cars owned = discrete, distance traveled = continuous

**Worked example:** Classify each of the following as qualitative, discrete quantitative, or continuous quantitative: (a) The weight of oranges in a shipment, (b) The number of correct answers on a 20-question quiz, (c) The brand of phone owned by a student, (d) The temperature of a cup of coffee.

1. Recall the definitions: Qualitative = categorical non-numerical, discrete = distinct countable values, continuous = any value in an interval.
2. (a) Weight is a numerical measurement that can take any value between a range (e.g. 120.5g, 120.54g).
3. Classification: (a) = continuous quantitative.
4. (b) Number of correct answers is numerical, only whole number values between 0 and 20.
5. Classification: (b) = discrete quantitative.
6. (c) Phone brand is a non-numerical category.
7. Classification: (c) = qualitative.
8. (d) Temperature can take any value within a range, so it is a continuous measurement.
9. Classification: (d) = continuous quantitative.

**Check your understanding**

Test your understanding

1. What type of data is the number of goals scored in a soccer season?

   - Qualitative
   - Discrete quantitative
   - Continuous quantitative

   *Why:* Goals are counted as whole numbers, so they are discrete, even though they are numerical.

## Common Sampling Methods

**Population vs Sample** — A population is the full set of individuals/items you want to draw conclusions about in a study. A sample is a smaller subset selected to collect data from, when studying the full population is impractical.

| Sampling Method | Description | Typical Use Case |
| --- | --- | --- |
| Simple Random | Every member of the population has equal chance of selection | Small, accessible populations |
| Systematic | Select every $n$th member from an ordered list of the population | Large populations with a pre-existing list |
| Stratified | Divide population into strata (groups by a key characteristic), sample from each stratum | Ensure proportional representation of important subgroups |
| Cluster | Divide population into geographically similar clusters, randomly select entire clusters to sample | Large, geographically dispersed populations |
| Convenience | Select easily accessible members | Pilot studies or preliminary research |

**Worked example:** A researcher wants to study student satisfaction with campus food, and needs to ensure representation of undergraduate, graduate, and international student groups. What sampling method is most appropriate, and how would they implement it?

1. The study requires representation of predefined subgroups, so stratified random sampling is the most appropriate method.
2. Step 1: Split the full population of students into 3 strata: undergraduates, graduates, international students.
3. Step 2: Calculate the proportion of the total population each stratum makes up, to get proportional sample sizes for each group.
4. Step 3: Use simple random sampling to select the required number of students from each stratum, then send the satisfaction survey.

## Identifying Sampling Bias

**Sampling Bias** — Bias is a systematic error in sampling that makes the sample unrepresentative of the target population. Common types include selection bias, voluntary response bias, non-response bias, and response bias.

**Worked example:** A researcher conducts a survey about weekly exercise habits by standing outside a gym and asking people entering to complete the survey. What type of bias is present, and how will it affect results?

1. The sample is selected only from people entering a gym, which systematically excludes people who do not go to this gym.
2. This is selection bias: people who go to a gym exercise more regularly on average than the general population.
3. The results will systematically overestimate the average amount of weekly exercise for the general population.

> **tip**
>
> Always ask: 'Which groups are systematically excluded from this sample?' This is the fastest way to spot bias in any study design.

## Reliability and Validity of Data (AHL)

Beyond avoiding bias, an HL study must produce data that is both **reliable** (consistent when repeated) and **valid** (actually measures what it claims to). These are distinct: a measurement can be highly reliable yet invalid — for example a miscalibrated scale that always reads 2 kg too heavy gives consistent but wrong values.

**Reliability vs Validity** — Reliability is about consistency of repeated measurements; validity is about whether the method measures the intended characteristic. A method must be reliable to be valid, but reliability alone does not guarantee validity.

*Example:* A stopped clock is perfectly reliable (always shows the same time) but not valid (it does not measure the actual time).

| Test | Type | How it works |
| --- | --- | --- |
| Test-retest | Reliability | Give the same test to the same group on two occasions and compare; strong agreement indicates high reliability. |
| Parallel forms | Reliability | Give two equivalent versions of the test to the same group and compare; consistent scores indicate reliability without memory effects. |
| Content validity | Validity | Expert judgement that the items fully cover the topic or construct being measured. |
| Criterion-related validity | Validity | Compare results against an established external benchmark (criterion), e.g. correlating a new aptitude test with later job performance. |

**Worked example:** A school designs a new 20-question questionnaire to measure student wellbeing. Describe one reliability test and one validity test the school could use.

1. Reliability (test-retest): Give the same questionnaire to the same group of students two weeks apart, then check whether each student's scores are close on the two occasions. Strong agreement indicates the questionnaire is reliable.
2. Validity (content validity): Ask wellbeing experts to review the 20 questions and confirm they cover all relevant aspects of wellbeing (emotional, social, physical) rather than, say, only measuring academic stress.

> **info**
>
> Degrees of freedom in a chi-squared goodness-of-fit test: when the expected frequencies require you to estimate parameters from the sample (for example the mean of a Poisson model or the $p$ of a binomial model), reduce the degrees of freedom by 1 for each estimated parameter, after combining any classes with expected frequency below 5.

**Worked example:** A chi-squared goodness-of-fit test checks whether the number of calls per minute follows a Poisson distribution. After combining tail classes there are 6 classes, and the Poisson mean was estimated from the sample. Find the degrees of freedom.

1. Start with (number of classes) minus 1:
2. $$6 - 1 = 5$$
3. One parameter (the Poisson mean) was estimated from the data, so subtract a further 1:
4. $$df = 6 - 1 - 1 = 4$$

## Common pitfalls

- **Wrong:** Confusing stratified and cluster sampling
  - Why it fails: Both methods split the population into groups, so they are often mixed up
  - Correct: Remember: Stratified sampling groups by shared characteristic, you sample from every group. Cluster sampling groups by location, you sample entire groups at random.
- **Wrong:** Calling shoe size or IQ continuous data
  - Why it fails: They are numerical measurements, so they are often misclassified as continuous
  - Correct: Any variable that only takes distinct, separated values (whole/half shoe sizes, whole IQ points) is discrete quantitative.
- **Wrong:** Assuming a large sample eliminates bias
  - Why it fails: Bias is caused by the sampling method, not sample size
  - Correct: A large biased sample is still systematically unrepresentative. Always check the sampling method for bias first, regardless of sample size.
- **Wrong:** Calling coded categorical data quantitative
  - Why it fails: Coded qualitative data is stored as a number, leading to misclassification
  - Correct: Classify data based on what it measures, not how it is stored. A number that just labels a category (e.g. 1 = New York, 2 = London) is still qualitative.

## Cheatsheet

| Concept | Quick Reference |
| --- | --- |
| Data Types | Qualitative = categorical; Discrete = countable values; Continuous = any measurable value |
| Sampling Methods | Simple Random = equal chance; Systematic = every nth; Stratified = sample each subgroup; Cluster = sample whole groups; Convenience = easy access |
| Common Bias Types | Selection = groups excluded; Voluntary = self-selected respondents; Non-response = missing participants; Response = inaccurate answers |

## What's next

This foundational sub-topic underpins all statistical work in IB AI HL. Correct classification of data and identification of bias is required for every topic from descriptive statistics to hypothesis testing, and exam questions regularly test these foundational concepts in both paper 1 and paper 2. 

After mastering data types, sampling, and bias, you will move on to organizing and visualizing data, then learn to summarize data with measures of center and spread, before moving on to probability and inferential statistics.

- [Descriptive statistics: measures of center and spread](https://www.owlsprep.com/study/ib-math-ai-hl-u5-descriptive-statistics-measures-of-center/)
- [Correlation and linear regression](https://www.owlsprep.com/study/ib-math-ai-hl-u5-correlation-and-linear-regression/)
- [Probability concepts, conditional probability, independent events](https://www.owlsprep.com/study/ib-math-ai-hl-u5-probability-concepts-conditional-probability-independent/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ib-math-ai-hl-u5-data-types-sampling-bias/
