All flashcards topics

Least squares regression and residualsEdexcel A-Level Further Maths: Flashcards

Card 1 of 130 of 13 known

Question

Formula for the gradient $b$ of the regression line of $y$ on $x$?

Tap or press Space to reveal

Tap card or press Space to flip

See all 13 cards
Formula for the gradient bb of the regression line of yy on xx?
b=SxySxxb=\dfrac{S_{xy}}{S_{xx}}
Formula for the intercept aa?
a=yˉ−bxˉa=\bar y-b\bar x
Formula for SxyS_{xy}?
∑xy−∑x∑yn\sum xy-\dfrac{\sum x\sum y}{n}
Formula for SxxS_{xx}?
∑x2−(∑x)2n\sum x^2-\dfrac{(\sum x)^2}{n}
What does the least squares method minimise?
The sum of the squares of the vertical distances (residuals) from the points to the line.
Define a residual.
Observed yy minus predicted y^\hat y: yi−(a+bxi)y_i-(a+bx_i).
What does a negative residual mean?
The point lies below the regression line (the model overestimates).
Formula for the residual sum of squares?
RSS=Syy−(Sxy)2Sxx\text{RSS}=S_{yy}-\dfrac{(S_{xy})^2}{S_{xx}}
What do the residuals of a least squares line sum to?
Zero.
Which point does the regression line always pass through?
(xˉ,yˉ)(\bar x,\bar y)
What does a pattern in the residuals suggest?
A linear model may not be suitable (for example, curvature).
What is extrapolation, and why is it risky?
Predicting outside the data range; the linear relationship may not continue.
How do you decide whether to remove an outlier?
Only if there is a reason (such as a recording error); then recalculate the line and RSS and compare.

Exam questions on Least squares regression and residuals

  1. A researcher models the relationship between a variable xx and a variable yy using the least squares regression line of yy on xx, y=a+bxy=a+bx. Summary statistics from the data give xˉ=5\bar x=5, yˉ=14\bar y=14, Sxx=40S_{xx}=40 and Sxy=88S_{xy}=88.
    One observation is x=6x=6, y=15y=15. Calculate the residual for this observation.2 marks
  2. A student records the number of hours, xx, spent revising and the score, yy, out of 40, on a test for 5 students: (1,12)(1,12), (2,15)(2,15), (3,21)(3,21), (4,22)(4,22), (5,30)(5,30). The summary statistics are n=5n=5, ∑x=15\sum x=15, ∑y=100\sum y=100, ∑x2=55\sum x^2=55, ∑xy=343\sum xy=343 and ∑y2=2194\sum y^2=2194.
    The regression line is y=7.1+4.3xy=7.1+4.3x. Interpret the value 4.34.3 in context, and explain why the line should not be used to predict the score of a student who revises for 15 hours.2 marks
  3. A café owner records the midday temperature, x ∘x\,^\circC, and the number of cold drinks sold, yy, on six days: (14,40)(14,40), (16,45)(16,45), (18,55)(18,55), (20,58)(20,58), (22,68)(22,68), (24,76)(24,76). The summary statistics are n=6n=6, ∑x=114\sum x=114, ∑y=342\sum y=342, ∑x2=2236\sum x^2=2236, ∑xy=6750\sum xy=6750 and ∑y2=20414\sum y^2=20414.
    Find the equation of the regression line of yy on xx.3 marks
See the full worksheet

Written by the Exaim team, led by Shaun Daswani (Head of Upper Secondary, Improve ME Institute; MSc Financial Mathematics, Imperial College London; BSc, UCL) and Jason Daswani (operational lead, Improve ME Institute; LSE).