Least squares regression and residuals

Least squares regression and residuals Test

Spec 1.1–2 · Edexcel A-Level Further Maths: Subtopic test

Studying this course? Keep your progress in one place.

Two ways to do this test

Question by question

One question at a time. Each answer is marked the moment you hand it in, so you learn as you go. Drago helps if you get stuck. All 10 questions, or just 5.

Exam mode

The whole paper in one go, timed like the real exam. Nothing is marked until you hand it in, then you get every mark explained.

10 questions, 27 marks

Edexcel A-Level Further Maths

Least squares regression and residuals

Total 27 marks

Name

Class

Date

  1. 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.
    (a)
    Find the value of bb.
    [1 mark]
    • A0.450.45
    • B2.22.2
    • C8.88.8
    • D33
    Show the mark scheme

    Mark scheme

    Answer: B
    (b)
    Find the value of aa.
    [1 mark]
    • A2525
    • B1111
    • C−3-3
    • D33
    Show the mark scheme

    Mark scheme

    Answer: D
    (c)
    One observation is x=6x=6, y=15y=15. Calculate the residual for this observation.
    [2 marks]
    Show the mark scheme

    Mark scheme

    M1: predicted value 3+2.2(6)=16.23+2.2(6)=16.2
    A1: residual
    =15−16.2=−1.2=15-16.2=-1.2
    Accept: follow-through from their
    aa and bb
    Do not accept:
    1.21.2 with no sign (the observation is below the line)

    Total for question 1: 4 marks

  2. 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.
    (a)
    Find the value of SxyS_{xy}.
    [1 mark]
    • A4343
    • B343343
    • C300300
    • D8686
    Show the mark scheme

    Mark scheme

    Answer: A
    (b)
    Find the residual sum of squares for the regression line of yy on xx.
    [1 mark]
    • A184.9184.9
    • B194194
    • C9.19.1
    • D4.34.3
    Show the mark scheme

    Mark scheme

    Answer: C
    (c)
    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]
    Show the mark scheme

    Mark scheme

    B1: each extra hour of revision is associated with an increase of 4.34.3 marks in the test score, on average
    B1:
    1515 hours is far outside the range of the data (11 to 55 hours), so this is extrapolation; for example, the line predicts 71.671.6, which exceeds the maximum score of 4040
    Accept: any valid reason that the linear model need not hold outside the data range

    Total for question 2: 4 marks

  3. 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.
    (a)
    Find the equation of the regression line of yy on xx.
    [3 marks]
    Show the mark scheme

    Mark scheme

    B1: Sxx=2236−11426=70S_{xx}=2236-\frac{114^2}{6}=70 and Sxy=6750−114×3426=252S_{xy}=6750-\frac{114\times342}{6}=252
    M1:
    b=SxySxx=25270b=\frac{S_{xy}}{S_{xx}}=\frac{252}{70} and a=yˉ−bxˉa=\bar y-b\bar x with xˉ=19\bar x=19, yˉ=57\bar y=57
    A1:
    y=−11.4+3.6xy=-11.4+3.6x
    Accept:
    a=−11.4a=-11.4 and b=3.6b=3.6 stated separately
    (b)
    Using y=−11.4+3.6xy=-11.4+3.6x, find the residual for the day on which the temperature was 20∘20^\circC. Hence find the residual sum of squares for the six days.
    [4 marks]
    Show the mark scheme

    Mark scheme

    M1: predicted value −11.4+3.6(20)=60.6-11.4+3.6(20)=60.6
    A1: residual
    =58−60.6=−2.6=58-60.6=-2.6
    M1:
    RSS=Syy−Sxy2Sxx\text{RSS}=S_{yy}-\frac{S_{xy}^2}{S_{xx}} with Syy=20414−34226=920S_{yy}=20414-\frac{342^2}{6}=920
    A1:
    920−252270=12.8920-\frac{252^2}{70}=12.8
    Accept:
    12.812.8 from summing the six squared residuals

    Total for question 3: 7 marks

  4. 4
    A student measures the height, yy cm, of a seedling at the end of each of weeks x=1,2,…,7x=1,2,\ldots,7 and records 3,7,8,17,12,15,153, 7, 8, 17, 12, 15, 15. The summary statistics are n=7n=7, ∑x=28\sum x=28, ∑y=77\sum y=77, ∑x2=140\sum x^2=140, ∑xy=364\sum xy=364 and ∑y2=1005\sum y^2=1005.
    (a)
    Find the equation of the regression line of yy on xx, and calculate the residual sum of squares.
    [6 marks]
    Show the mark scheme

    Mark scheme

    B1: Sxx=140−2827=28S_{xx}=140-\frac{28^2}{7}=28
    B1:
    Sxy=364−28×777=56S_{xy}=364-\frac{28\times77}{7}=56
    M1:
    b=SxySxxb=\frac{S_{xy}}{S_{xx}} and a=yˉ−bxˉa=\bar y-b\bar x with xˉ=4\bar x=4, yˉ=11\bar y=11
    A1:
    y=3+2xy=3+2x
    M1:
    RSS=Syy−Sxy2Sxx\text{RSS}=S_{yy}-\frac{S_{xy}^2}{S_{xx}} with Syy=1005−7727=158S_{yy}=1005-\frac{77^2}{7}=158
    A1:
    158−112=46158-112=46
    (b)
    The week 4 height is suspected to be a misreading. Find the residual for week 4. With week 4 removed, the summary statistics are n=6n=6, ∑x=24\sum x=24, ∑y=60\sum y=60, ∑x2=124\sum x^2=124, ∑xy=296\sum xy=296 and ∑y2=716\sum y^2=716. Find the new regression line and its residual sum of squares, and comment on whether removing the week 4 value is justified.
    [6 marks]
    Show the mark scheme

    Mark scheme

    B1: residual at x=4x=4: 17−(3+2×4)=617-(3+2\times4)=6, much larger than the other residuals, which lie between −2-2 and 00
    M1:
    Sxx=124−2426=28S_{xx}=124-\frac{24^2}{6}=28 and Sxy=296−24×606=56S_{xy}=296-\frac{24\times60}{6}=56
    A1:
    y=2+2xy=2+2x
    M1:
    Syy=716−6026=116S_{yy}=716-\frac{60^2}{6}=116 and RSS=116−56228\text{RSS}=116-\frac{56^2}{28}
    A1:
    RSS=4\text{RSS}=4
    R1: RSS falls from
    4646 to 44, so the remaining points fit a line much better, supporting treating week 4 as an outlier; it should only be removed if there is a reason such as a misreading
    Accept: any comment linking the large residual and large drop in RSS to the outlier

    Total for question 4: 12 marks

End of questions

Subtopic tests