Year 2 Statistics · Chapter 1
Regression and Correlation
Specification: Edexcel Paper 3 §2.2, 5.1 — Correlation and regression · AQA section L2, O1
In this chapter
Key facts — this chapter
- The product moment correlation coefficient measures the strength of linear correlation in a sample. Always : is perfect positive linear correlation, perfect negative, and no linear correlation.
- Find with a calculator. It has no units, and it is unchanged by coding either variable with a positive scale factor.
- To test for correlation in the population, use its correlation coefficient : against or (one-tailed) or (two-tailed).
- Compare with the critical value for the sample size and significance level. If is beyond it, in the direction of , reject . With a p-value, reject when the p-value is at most the significance level.
- A model becomes the straight line . A model becomes .
Year 1 described correlation in words and used a regression line to make predictions. This chapter puts a number on the strength of a linear relationship, then asks the question a statistician must: is the pattern in this sample strong enough to believe it holds in the whole population? It ends by straightening curves, so that the tools of linear regression can fit exponential and power models too.
1. The product moment correlation coefficient
Reading the coefficient
- close to : strong positive linear correlation.
- close to : strong negative linear correlation.
- close to : little or no linear correlation.
Why it works
, where measures how and vary together, and and measure how each varies on its own. Points above and to the right of , or below and to the left, make positive; the division scales the result to lie between and .
Common mistake
measures linear correlation only. Points lying on a U-shaped curve can give near , even though depends strongly on . Always look at the scatter diagram before trusting .
Worked example 1.1 · Finding the coefficient
A kiosk records the hours of sunshine, , and the number of ice creams sold, , on eight days. Find the product moment correlation coefficient and interpret it.
| (hours) | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|---|---|---|---|---|---|---|---|---|
| (sales) | 31 | 45 | 38 | 52 | 49 | 63 | 56 | 70 |
The calculator’s two-variable statistics mode gives (3 s.f.).
In context
There is strong positive linear correlation between hours of sunshine and ice cream sales: sunnier days tend to bring more sales.
On your calculator
Enter the data in the two-variable statistics or linear regression mode, with and in separate columns. The results list alongside the coefficients and of the regression line .
2. Testing for correlation
A sample of eight days gives . Would a different eight days give something similar, or could the pattern be chance? A hypothesis test decides, using the population correlation coefficient (the Greek letter rho).
Testing for correlation
- State (no correlation in the population).
- State : or if a direction is suggested (one-tailed), or if not (two-tailed).
- Find the critical value for the sample size and the significance level. For a two-tailed test, use half the significance level in each tail.
- Reject if is beyond the critical value in the direction of , and conclude in context.
The critical values come from a table in the formula booklet; questions state the ones you need. The table assumes the data come from a bivariate Normal distribution, so that both variables are roughly Normal.
Worked example 1.2 · A one-tailed test
Using the data in Example 1.1, test at the 1% level whether there is positive correlation between hours of sunshine and ice cream sales. The critical value for at 1% (one-tailed) is .
-
and , where is the population correlation coefficient.
-
, which is more than , so the result is significant: reject .
In context
There is sufficient evidence at the 1% level of positive correlation between hours of sunshine and ice cream sales.
Common mistake
Hypotheses are about the population, so they use , never . Writing loses the mark: is a number you calculate, and it certainly isn’t exactly .
Worked example 1.3 · A two-tailed test
A teacher suspects that the time students spend on social media is related to their sleep, but has no view on the direction. For a sample of 12 students, . Test at the 5% level whether there is correlation. The critical value for at 2.5% (one-tailed) is .
-
and .
-
Two-tailed at 5% means 2.5% in each tail, so the critical values are .
-
lies between and : not significant, so do not reject .
In context
There is insufficient evidence at the 5% level of correlation between time on social media and sleep.
Drag the points, or add and remove them. The product moment correlation coefficient r moves along the scale underneath, where the shaded part is the critical region for the test you choose. When r lands in it, the sample is evidence of correlation in the population.
Software often reports a p-value instead: the probability, if , of a sample correlation at least as extreme as the one observed.
Worked example 1.4 · Using a p-value
A researcher records the daily step count and the hours of sleep of a random sample of 25 adults, and tests against . The sample gives , with a p-value of . State the conclusion at the 1% level, and at the 5% level.
-
At 1%: , so the result is not significant: do not reject .
-
At 5%: , so the result is significant: reject .
In context
At the 1% level there is insufficient evidence of positive correlation between step count and sleep; at the 5% level there is sufficient evidence. The stricter the test, the stronger the evidence it demands.
Common mistake
Not rejecting does not prove that . It means this sample isn’t strong enough evidence against it. And rejecting shows correlation, not causation.
3. Straightening curves
Many relationships are curved: populations grow exponentially, and areas and masses grow as powers of length. Taking logarithms turns both kinds of curve into straight lines, as in Chapter 11 of Year 1 Pure, and a straight line is something regression can fit.
Changing the variables
For , plot against : the gradient is and the intercept . For , plot against : the gradient is and the intercept .
Worked example 1.5 · A power model
A student times a pendulum of length metres and finds its period seconds for several lengths. She models . The regression line of on is . Find and , and estimate the period of a pendulum m long.
-
Compare with : and , so (3 s.f.).
-
The model is , so for , s (3 s.f.).
In context
: the period grows with the square root of the length, as physics predicts.
Worked example 1.6 · An exponential model
The number of bacteria in a culture is counted at times hours and modelled by . The regression line of on is . Find and , interpret them, and estimate when .
-
Compare with : and .
-
So (3 s.f.) and (3 s.f.).
-
At : , so (3 s.f.).
In context
The culture starts with about 126 bacteria, and the number grows by about 8.4% each hour, since . After 10 hours the model predicts about 282 bacteria.
Common mistake
Keep the logarithm in the intercept. The intercept of the straight line is , not , so . And a model only describes the range of the data it was fitted to: estimates far outside it are extrapolation.
Practice
Twelve questions in three tiers. Try each one properly before opening the solution. The solutions show the full method, not just answers. Critical values are given in each question; logarithms are to base 10 unless a question says otherwise. Give answers to 3 significant figures where they aren’t exact.
Warm-up
Describe the correlation shown by each value of the product moment correlation coefficient: (a) , (b) , (c) .
Show solution
(a) Strong positive linear correlation. (b) Very weak negative linear correlation: essentially none. (c) Strong negative linear correlation.
A biologist believes that taller people have longer arm spans. For a sample of 8 adults, . Test her belief at the 5% level. The critical value for at 5% (one-tailed) is .
Show solution
and , where is the population correlation coefficient.
, so the result is significant: reject . There is sufficient evidence at the 5% level of positive correlation between height and arm span.
For a sample of 20 cars, the correlation between engine size and the number of faults reported is . Test at the 5% level whether there is correlation. The critical value for at 2.5% (one-tailed) is .
Show solution
and . Two-tailed at 5%, so compare with .
, so the result is not significant: do not reject . There is insufficient evidence at the 5% level of correlation between engine size and faults.
Write each model as a straight line, stating what to plot and the gradient and intercept: (a) , (b) .
Show solution
(a) : plot against . The gradient is and the intercept .
(b) : plot against . The gradient is and the intercept .
Standard
A coach records the hours of training, , and a performance score, , for six athletes in one month.
| (hours) | 12 | 15 | 17 | 20 | 24 | 28 |
|---|---|---|---|---|---|---|
| (score) | 56 | 54 | 66 | 61 | 71 | 66 |
- Find the product moment correlation coefficient. [1]
- Test at the 5% level whether more training goes with a higher score. The critical value for at 5% (one-tailed) is . [4]
- The critical value at 2.5% (one-tailed) is . Would the conclusion be the same at the 2.5% level? [1]
Show solution
(a) From a calculator, (3 s.f.).
(b) and . , so reject : there is sufficient evidence at the 5% level of positive correlation between training hours and score.
(c) No: , so at 2.5% the result would not be significant.
A quantity is modelled by . The regression line of on is . Find and , and estimate when .
Show solution
and , so (3 s.f.).
At : .
The value pounds of a car years after it was new is modelled by . The regression line of on is . Find and , and interpret each in context.
Show solution
, so (3 s.f.): the model’s value of the car when new, about £15,800.
, so (3 s.f.): each year the car keeps about 87.1% of its value, losing about 12.9% a year.
A test of against gives a p-value of . State, with a reason, the conclusion at the 1% level and at the 5% level.
Show solution
At 1%: , so do not reject : insufficient evidence of negative correlation.
At 5%: , so reject : sufficient evidence of negative correlation.
- A scatter diagram shows points lying close to a U-shaped curve, but . Explain how both can be true. [2]
- After a test finds insufficient evidence of correlation, a researcher writes “this proves the two variables are not related”. Give two criticisms. [2]
Show solution
(a) measures linear correlation only. On a U-shape, falls then rises, so the linear trends cancel and is near , even though depends strongly on .
(b) Not rejecting is not proof that : the sample may just be too small to show the correlation. And the test looks only for linear correlation, so the variables could still be related in a non-linear way.
Exam style
A café owner records the midday temperature, °C, and the number of hot drinks sold, , on eight days.
| (°C) | 4 | 7 | 9 | 12 | 14 | 17 | 19 | 22 |
|---|---|---|---|---|---|---|---|---|
| (drinks) | 82 | 85 | 74 | 79 | 64 | 71 | 60 | 66 |
- Find the product moment correlation coefficient. [1]
- Test at the 5% level whether there is correlation between temperature and hot drink sales. The critical value for at 2.5% (one-tailed) is . [4]
- The critical value for at 0.5% (one-tailed) is . State the conclusion of the same test at the 1% level. [2]
- State an assumption needed for the test to be valid. [2]
Show solution
(a) From a calculator, (3 s.f.).
(b) and . Two-tailed at 5%, so compare with . , so reject : there is sufficient evidence at the 5% level of correlation between temperature and hot drink sales.
(c) At 1% two-tailed the critical values are , and lies between them: do not reject . There is insufficient evidence at the 1% level.
(d) The data come from a bivariate Normal distribution: temperature and sales are each roughly Normally distributed. (The eight days should also be a random sample.)
A fisheries officer models the mass grams of a species of fish by , where cm is its length. From fish between 10 cm and 40 cm long, the regression line of on is .
- Find and . [3]
- Estimate the mass of a fish 30 cm long. [2]
- Explain why close to is reasonable. [1]
- Comment on using the model for a fish 80 cm long. [2]
Show solution
(a) and , so (3 s.f.).
(b) , so g.
(c) Mass is proportional to volume, and a fish that is twice as long is roughly twice as wide and twice as deep: the volume grows as the cube of the length.
(d) 80 cm is far outside the 10–40 cm range of the data, so this is extrapolation and the estimate is unreliable.
A variable is modelled by . Using natural logarithms, the regression line of on is .
- Find and . [3]
- Estimate when . [2]
- Write the model in the form . [1]
Show solution
(a) , so (3 s.f.). , so (3 s.f.).
(b) , so .
(c) .