Statistics, correlation and regression
Sampling methods and bias, presenting data with histograms, cumulative frequency and box plots, mean, median, quartiles, standard deviation and outliers, scatter diagrams, Pearson’s r, the regression line, Spearman’s rank correlation, and for HL: designing data collection, reliability and validity, and non-linear regression with R².
mentorriyaz.in
In 30 seconds
- Sampling: a random sample gives every member an equal chance. Bias comes from the method (convenience, self-selection, leading questions), not from the sample being small.
- Summaries: mean, median, mode for centre; range, IQR = Q3 − Q1 and standard deviation σ for spread. An outlier is below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR.
- Pearson's r (−1 ≤ r ≤ 1) measures linear correlation. The regression line of y on x, y = ax + b, predicts y from x, and passes through (x̄, ȳ).
- Spearman's rs uses ranks, so it measures any monotonic relationship (always increasing or always decreasing), linear or not.
- HL: design reliable, valid data collection, and choose between models with the coefficient of determination R2.
By the end you can
- Distinguish populations and samples, and choose sampling methods; identify bias.
- Present data with frequency tables, histograms, cumulative frequency graphs and box plots.
- Find and interpret mean, median, mode, quartiles, IQR and standard deviation, and identify outliers.
- Use scatter diagrams, Pearson's r and the regression line of y on x, and interpret them in context.
- Calculate and interpret Spearman's rank correlation coefficient.
- Design data collection, and discuss reliability and validity. HL
- Fit non-linear regression models and compare them using R². HL
1Sampling and data
| Method | How | Watch out for |
|---|---|---|
| simple random | every member equally likely (random numbers) | needs a full list of the population |
| systematic | every kth member from a random start | patterns in the list |
| stratified | sample from each group in proportion to its size | needs group sizes |
| quota | fill a fixed number from each group, not at random | interviewer bias |
| convenience | whoever is easiest to reach | rarely representative |
A school has 300 students in Year 11 and 200 in Year 12. A stratified sample of 40 is chosen. How many from each year?
- Year 11: 300500 × 40 = 24 M1A1
- Year 12: 200500 × 40 = 16 A1
- Discrete data is counted; continuous data is measured and can be grouped into classes. Outliers should be checked: a typing error is removed, a genuine extreme value is kept.
2Summary statistics and box plots
Commute times (minutes) are 12, 15, 15, 18, 20, 22, 25, 31, 45. Find the mean, median, quartiles and decide whether 45 is an outlier.
- mean = 2039 = 22.6 min; median = 20 A1A1
- Q1 = 15, Q3 = 28 (GDC), IQR = 13 A1
- upper fence = 28 + 1.5 × 13 = 47.5, so 45 is not an outlier M1R1
- Effect of changes: adding k to every value adds k to the mean and median and leaves σ and IQR unchanged; multiplying by k multiplies all of them by k.
- Grouped data: estimate the mean with class midpoints; read the median and quartiles from a cumulative frequency curve at n/2, n/4 and 3n/4.
3Correlation and regression
| r | Description |
|---|---|
| 0.75 ≤ ǀrǀ ≤ 1 | strong |
| 0.5 ≤ ǀrǀ < 0.75 | moderate |
| 0.25 ≤ ǀrǀ < 0.5 | weak |
| ǀrǀ < 0.25 | very weak or none |
Hours studied x = 2, 3, 5, 6, 8, 9, 11 and scores y = 52, 55, 63, 64, 72, 75, 84. Find r, the regression line, and predict the score for 7 hours.
- linear regression on the GDC: r = 0.996, strong positive linear correlation A1R1
- y = 3.47x + 44.6 A1
- y(7) = 3.47(7) + 44.6 = 68.9 A1
- Interpreting a and b in context: each extra hour of study adds about 3.47 marks; a student who studies 0 hours is predicted 44.6 (outside the data, so unreliable).
- Correlation is not causation: ice-cream sales and drownings correlate because both rise in hot weather.
- Which line? Use the y-on-x line only to predict y from x. The IB course doesn't ask you to predict x from y with it.
4Spearman's rank correlation
A judge's scores p = 10, 20, 30, 40, 50, 60 and a second judge's q = 3, 7, 5, 12, 11, 15. Find Spearman's rs.
- ranks of p: 1, 2, 3, 4, 5, 6; ranks of q: 1, 3, 2, 5, 4, 6 M1
- Pearson's r of the ranks (GDC) M1
- rs = 0.886, strong agreement A1R1
- Ties: give tied values the mean of the ranks they share. Two values tied for 2nd and 3rd both get 2.5.
5Designing data collection HL
- Reliability: would you get similar results if you repeated it (test–retest, parallel forms)? Validity: does it measure what it claims to (content validity, criterion validity)?
- Choosing a sample size and method: larger samples reduce random error but not bias. Pilot your questionnaire, avoid leading questions, and decide how to handle missing data.
6Non-linear regression and R² HL
- Least squares: the regression model makes the sum of squared residuals as small as possible.
- R2 (0 ≤ R2 ≤ 1) is the proportion of the variation in y explained by the model. For a linear model R2 = r2; here 0.9962 = 0.993.
- Comparing models: fit quadratic, cubic, exponential, power and sinusoidal regressions on the GDC and compare R2, but also ask whether the model makes sense in context. A high R2 with impossible predictions is a bad model.
Test yourself — cover the answers first
Quick check
- Which sampling method picks every 10th name from a random start?
- Add 5 to every value. What happens to σ?
- r = −0.92. Describe the correlation.
- Should you use the y-on-x line to predict x?
- Two values tie for ranks 4 and 5. What rank does each get?
- HL A linear model has r = 0.8. Find R².
Exam-style
- The data set 4, 7, 8, 9, 10, 11, 12, 13, 30 has Q1 = 7.5 and Q3 = 12.5. Is 30 an outlier? Find the median and IQR.
- For a regression line y = −2.1x + 95 with r = −0.85, interpret the gradient in context if x is the number of absences and y is the exam score, and comment on predicting the score for 60 absences.
Show answers
- systematic
- no change
- strong negative linear correlation
- no
- 4.5
- 0.64
- IQR = 5; upper fence 12.5 + 7.5 = 20
30 > 20, so 30 is an outlier
median 10, IQR 5 - each extra absence is associated with a score about 2.1 marks lower
60 absences gives −31, which is impossible: it is far outside the data, so the prediction is not reliable (and correlation doesn't prove absences cause lower scores)
Send it to me on WhatsApp. I read every message.
Want regular help? Send this to your parent →