Porisma

Worked solution

Compare fuel-consumption models using squared residuals

Abi and Bhani measure fuel consumption yy (kilometres per litre) for a car driven at different constant speeds xx (kilometres per hour).

xxyy
4022
4520
5018
5517
6016

(i) Abi models the data with y=35−13xy=35-\frac13x.

(a) On graph paper, draw a scatter diagram of the data and the line y=35−13xy=35-\frac13x.

(b) For a fitted line y=f(x)y=f(x), the source describes the residual at (a,b)(a,b) as the vertical distance between (a,f(a))(a,f(a)) and (a,b)(a,b). Mark each residual on the diagram.

(c) Calculate the sum of squared residuals for Abi’s line.

(d) Explain why, in general, the sum of squared residuals is used instead of the sum of residuals.

Bhani uses a line through (40,22)(40,22) and (55,17)(55,17). The sum of squared residuals for Bhani’s line is 1.

(ii) State, with a reason, which model gives a better fit.

(iii) Cerie carries out a similar experiment on a different car. Her fitted line has a sum of squared residuals of 0. What can you deduce about her data points?

[N2019/II/10(modified)]

CJC · Discussion · Question 9

(i)(a) Plot all observations and Abi’s proposed line

Answer

Plot the five pairs and y=35−x/3y=35-x/3.

Use speed (km/h) horizontally and consumption (km/litre) vertically. For example, Abi’s line passes through (45,20)(45,20) and (60,15)(60,15). The diagram retains the five measured pairs and a coordinate grid. This is the supplied candidate line, not a newly computed least-squares regression.

How did this part go?

(i)(b) Draw the vertical differences

Answer

Signed residuals: 1/3,  0,  −1/3,  1/3,  11/3,\;0,\;-1/3,\;1/3,\;1.

At each recorded speed, subtract the fitted consumption from the observation:

xxyy35−x/335-x/3e=y−y^e=y-\hat y
402265/365/31/31/3
4520200
501855/355/3−1/3-1/3
551750/350/31/31/3
6016151

Mark a vertical segment between each observation and its fitted point. At speed 45 the residual is zero, so its segment has zero length. The source’s geometric distances are the magnitudes of these signed residuals; squaring either gives the same result.

How did this part go?

(i)(c) Sum the squared residuals

Answer

SSEAbi=4/3≈1.33\mathrm{SSE}_{Abi}=4/3\approx1.33.

Using the exact residuals,

∑ei2=19+0+19+19+1=43.\begin{aligned}&\sum e_i^2\\ & =\frac19+0+\frac19+\frac19+1\\ & =\frac43.\end{aligned}

This agrees with the printed answer 1.33. Keep the thirds unrounded until the final result.

How did this part go?

(i)(d) Prevent cancellation of errors

Answer

Squaring prevents signed errors from cancelling.

Positive and negative residuals can cancel in an ordinary sum even when the observations are far from the line. Squared residuals are all nonnegative and give larger discrepancies greater weight. If the source’s word “distance” is interpreted as unsigned length, such lengths already cannot cancel; the conventional residual here is signed. Minimizing squared residuals is the stated criterion, distinct from minimizing absolute distances.

How did this part go?

(ii) Compare the same error criterion

Answer

Bhani’s line fits these observations better: 1<4/31<4/3.

Bhani’s slope is (17−22)/(55−40)=−1/3(17-22)/(55-40)=-1/3 and intercept is 106/3106/3. Its residuals are 0,−1/3,−2/3,0,2/30,-1/3,-2/3,0,2/3, whose squares sum to 1, matching the given value. Since both lines are compared on the same five observations and the same vertical squared-error criterion, Bhani’s smaller total gives the better of these two fits. This comparison does not establish that Bhani’s line is the globally optimal least-squares line.

How did this part go?

(iii) Interpret zero error for Cerie’s different car

Answer

Every observed point lies exactly on Cerie’s fitted line.

Each squared residual is nonnegative. Their sum can be zero only if every residual is zero, so each measured point is on her line. The question supplies no Cerie data, slope or intercept: none can be inferred. This exact sample fit does not by itself guarantee the relationship at other speeds or for other cars.

How did this part go?

Compare your sketch

Expand diagram

Use the scrollbars or arrow keys to inspect details.

The five observed speed/consumption pairs appear in both panels. Left: Abi’s line y = 35 − x/3, with vertical residuals 1/3, 0, −1/3, 1/3 and 1; their squared sum is 4/3. Right: Bhani’s line y = 106/3 − x/3, with residuals 0, −1/3, −2/3, 0 and 2/3; their squared sum is 1.
The five observed speed/consumption pairs appear in both panels. Left: Abi’s line y = 35 − x/3, with vertical residuals 1/3, 0, −1/3, 1/3 and 1; their squared sum is 4/3. Right: Bhani’s line y = 106/3 − x/3, with residuals 0, −1/3, −2/3, 0 and 2/3; their squared sum is 1.
The five observed speed/consumption pairs appear in both panels. Left: Abi’s line y = 35 − x/3, with vertical residuals 1/3, 0, −1/3, 1/3 and 1; their squared sum is 4/3. Right: Bhani’s line y = 106/3 − x/3, with residuals 0, −1/3, −2/3, 0 and 2/3; their squared sum is 1.

Solution notes

All six printed asks, both graphing tasks, five observations, Abi equation, Bhani defining points/given SSE 1, Cerie different-car context and printed 1.33 retained. Exact arithmetic and signed-versus-geometric residual qualification authored; no printed marks.