15/3848–12FE Reference Handbook 10.6 · Engineering Probability and Statistics · p. 70 Least squares; p. 71 R

Handbook formula

Linear Least Squares

The least-squares line ŷ = â + b̂x on p. 70 uses b̂ = Sxy/Sxx and â = ȳ − b̂x̄. The computational slope below is the same ratio. p. 71 prints R = Sxy/√(Sxx Syy) and R². Correlation is not causation. The three points in the example are original teaching data.

Number of data pairs
Intercept
Slope
Sample means

Step-by-step solved example

Fit y = a + bx to (1,2), (2,3), (3,5).

(1,2)(2,3)(3,5)Replay
Best-fit line through scattered (x,y) data.
  1. 1. Sums

    n=3, Σx=6, Σy=10, Σxy=1·2+2·3+3·5=23, Σx²=1+4+9=14.

  2. 2. Slope

    b = (3·23 − 6·10)/(3·14 − 6²) = (69−60)/(42−36) = 1.5.

  3. 3. Intercept

    a = 10/3 − 1.5·2 = 3.333 − 3 = 0.333.

Answer: y = 0.333 + 1.5x

10 practice questions

0/10 correct

1.The least-squares line always passes through

2.If every y increases by 4, the slope b

3.n = 2 points determine a line with residual sum of squares

4.Coefficient of determination r² = 1 means

5.The quantity minimized is

6.x̄ = 2, ȳ = 5, b = 3. Intercept a =

7.If x and y are uncorrelated, the least-squares slope is

8.n Σx² − (Σx)² is proportional to

9.Extrapolation far beyond the data range is

10.Three points (0,0),(1,1),(2,1). Σx, Σy, Σxy =