Consider the following data:
| Year | 2012 | 2013 | 2014 | 2015 | 2016 |
| Sales (in Rs. crores) | 9 | 18 | 21 | 29 | 38 |
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.9x\)
There are 5 years (odd), so take the middle year 2014 as origin: x = year − 2014, giving x = −2, −1, 0, 1, 2. Then \(\sum x = 0\) and the normal equations of y = a + bx reduce to
\( \displaystyle a = \frac{\sum y}{n},\quad b = \frac{\sum xy}{\sum x^2} \)
The sums:
\(\sum y = 9 + 18 + 21 + 29 + 38 = 115\)
\(\sum xy = -18 - 18 + 0 + 29 + 76 = 69\)
\(\sum x^2 = 4 + 1 + 0 + 1 + 4 = 10\)
\( \displaystyle a = \frac{115}{5} = 23,\quad b = \frac{69}{10} = 6.9 \)
So the trend line is y = 23 + 6.9x, with origin at 2014 and x in years. Option (2) has a and b interchanged.