Bivariate data, correlation and regression

Bivariate data, correlation and regression

Spec 2.2 · Edexcel A-Level Maths: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • Bivariate data are pairs (x,y)(x,y); describe correlation by direction and strength, in context.
  • A regression line y=a+bxy=a+bx: the gradient bb is the average change in yy per unit of xx.
  • Interpolation (inside the data range) is reliable; extrapolation (outside) is not.
  • y=axny=ax^n: plot log⁡y\log y against log⁡x\log x (gradient nn, intercept log⁡a\log a). y=kbxy=kb^x: plot log⁡y\log y against xx (gradient log⁡b\log b, intercept log⁡k\log k).
  • Correlation does not imply causation.

Scatter diagrams and correlation

Describe the direction (positive, negative or none) and the strength (strong or weak), in context.

Bivariate data are pairs of values (x,y)(x,y) for each item. Correlation measures how closely the points follow a line. Strong means close to a line; weak means widely scattered.

A scatter diagram may show distinct sections of the population with different patterns. Then a single regression line may be inappropriate, and the groups should be considered separately.

12345678910246810xypositivenegativenone
Idealised lines showing positive, negative and no correlation.

Positive

  • y tends to increase as x increases

Negative

  • y tends to decrease as x increases

Zero

  • No linear pattern

As the outside temperature rises, ice-cream sales rise and the points lie very close to a line. How should you describe this?

Explanatory and response variables

The explanatory variable goes on the horizontal axis and the response variable on the vertical axis.

The explanatory variable is the one you choose or think explains the other. The response variable is measured to see its response. A regression line of yy on xx has the form y=a+bxy=a+bx.

The gradient bb is the average change in yy for a one-unit increase in xx; the intercept aa is the predicted yy when x=0x=0, which may have no meaning in context. For h=75+5.2ah=75+5.2a, height rises by 5.25.2 cm per year of age on average.

1234567891060708090100110120130140xyintercept 75age 5: 101 cmh = 75 + 5.2a
Regression line h = 75 + 5.2a: height rises by 5.2 cm per year of age on average.
  • Regression liney=a+bxy=a+bx
  • Gradient bbaverage change in yy per unit of xx

A regression line is h=75+5.2ah=75+5.2a with hh in cm and aa in years. Interpret the gradient.

Interpolation and extrapolation

Predictions inside the range of the data are reliable; predictions outside it are not.

Predicting inside the range is interpolation; predicting outside is extrapolation, which is unreliable because the relationship may not continue.

For ages 5 to 12, h=75+5.2ah=75+5.2a at a=8a=8 gives 116.6116.6 cm (reliable), but at a=30a=30 gives 231231 cm (unrealistic). Always give the reason: the value is outside the range of the data.

510152025306080100120140160180200220240xy(8, 116.6) inside the range(30, 231) outside the rangeh = 75 + 5.2a
Data cover ages 5 to 12: age 8 is interpolation, age 30 extrapolation.

The data cover ages 5 to 12. Is a prediction at age 10 reliable?

Linear form of y=axny=ax^n

Take logs: log⁡y=log⁡a+nlog⁡x\log y=\log a+n\log x, so plot log⁡y\log y against log⁡x\log x.

For a power model y=axny=ax^n, taking logs of both sides gives a straight line with gradient nn and vertical intercept log⁡a\log a.

0.20.40.60.811.21.41.61.821234567xyintercept log alog y = log 2 + 3 log x
For y = 2x³, a plot of log y against log x is a straight line with gradient 3 and intercept log 2 ≈ 0.301.
  • y=axny=ax^nlog⁡y=log⁡a+nlog⁡x\log y=\log a+n\log x

Worked example

A plot of log⁡y\log y against log⁡x\log x is a straight line with gradient 1.51.5 and intercept 0.4770.477. Find yy when x=100x=100.

For y=axny=ax^n, what do you plot to get a straight line?

Linear form of y=kbxy=kb^x

Take logs: log⁡y=log⁡k+xlog⁡b\log y=\log k+x\log b, so plot log⁡y\log y against xx.

For an exponential model y=kbxy=kb^x, the plot of log⁡y\log y against xx is a straight line with gradient log⁡b\log b and intercept log⁡k\log k. Use log⁡(ab)=log⁡a+log⁡b\log(ab)=\log a+\log b and log⁡bx=xlog⁡b\log b^x=x\log b.

1234560.511.522.53xyintercept log klog y = log 3 + x log 2
For y = 3 × 2ˣ, a plot of log y against x is a straight line with gradient log 2 ≈ 0.301 and intercept log 3 ≈ 0.477.
  • y=kbxy=kb^xlog⁡y=log⁡k+xlog⁡b\log y=\log k+x\log b

Worked example

The line of log⁡y\log y against xx passes through (0,1.20)(0,1.20) and (4,2.00)(4,2.00). Find kk and bb.

For y=kbxy=kb^x, the plot of log⁡y\log y against xx has gradient 0.30.3. What is bb?

Correlation and causation

No: correlation does not imply causation.

Two variables can be correlated because a third confounding variable affects both, by coincidence, or because one does cause the other. Only a controlled experiment, with random allocation of the explanatory variable, can establish causation.

When evaluating a claim, state the association found, say it does not prove causation, suggest another factor, and recommend how to test it.

  1. 1

    Hot weather

    more ice cream sold

  2. 2

    Hot weather

    more people swim, so more drownings

  3. 3

    Correlation

    ice cream sales and drownings rise together, but neither causes the other

A confounding variable.

Third variable

Reason:
Affects both variables
Example:
Hot weather raises ice-cream sales and swimming

Coincidence

Reason:
No real link
Example:
Unrelated trends that happen to match

Causation

Reason:
One causes the other
Example:
Needs a controlled experiment to show

Ice-cream sales and drowning incidents are strongly positively correlated. What is the best explanation?

Try an exam question

A scientist models the mass mm grams of a plant against its age tt days, using data for t=5t=5 to t=20t=20, by m=12+3.5tm=12+3.5t. Interpret the gradient, and comment on the reliability of using the model to predict the mass at t=40t=40.

[3 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

What height does the model predict for a child aged 8 years?

1 mark, marked against the mark scheme

Revision notes