Consider the following data:
| Year | 2008 | 2009 | 2010 | 2011 | 2012 |
| Production (in tons) | 9 | 17 | 23 | 29 | 40 |
A straight line trend by the method of least squares is:
Answer & explanation
Correct answer: option 4
The correct answer is Option (4) → \(y = 23.6 + 7.4x\)
There are 5 years (an odd number), so the middle year 2010 is taken as origin, with x = year − 2010:
\(x:\ -2,\ -1,\ 0,\ 1,\ 2\)
\(y:\ 9,\ 17,\ 23,\ 29,\ 40\)
Now \(\sum x = 0\), so the normal equations of y = a + bx give a and b directly. The sums are
\(\sum y = 9 + 17 + 23 + 29 + 40 = 118\)
\(\sum x^2 = 4 + 1 + 0 + 1 + 4 = 10\)
\(\sum xy = -18 - 17 + 0 + 29 + 80 = 74\)
\( \displaystyle a = \frac{\sum y}{n} = \frac{118}{5} = 23.6 \)
\( \displaystyle b = \frac{\sum xy}{\sum x^2} = \frac{74}{10} = 7.4 \)
So the trend line is y = 23.6 + 7.4x, with origin 2010 and x in years.