Solution

Least-Squares Intercept by Hand

Show the problem again

Six observations $(x, y)$ are: (1, 3), (2, 4), (3, 4), (4, 9), (5, 8), (6, 12). Fit the ordinary least-squares line $y = a + bx$ of $y$ on $x$. What is the intercept $a$? Give it as a reduced fraction.

Worked solution

Here $\bar x = 7/2$ and $\bar y = 40/6 = 20/3$. Then $S_{xx} = \sum (x-\bar x)^2 = 35/2$ and $S_{xy} = \sum (x-\bar x)(y-\bar y) = 31$, so the slope is $b = 31/(35/2) = 62/35$. The line passes through $(\bar x, \bar y)$, so $a = \bar y - b\bar x = 20/3 - (62/35)(7/2) = 20/3 - 31/5 = 7/15$. The intercept is **7/15**.

Source: Original exercise written for AxiomIQ.