Question:medium

Fit a straight-line trend by the method of least squares for the following data:

\[ \begin{array}{lcccccc} \text{Year:} & 2011 & 2012 & 2013 & 2014 & 2015 & 2016 \\ \text{Production (in tons):} & 210 & 225 & 275 & 220 & 240 & 235 \end{array} \]

Show Hint

To fit a straight-line trend: code $x$ with midpoint as 0, compute $a = \bar{y}$, and $b = \dfrac{\sum xy}{\sum x^2}$.
Updated On: Jan 14, 2026
Show Solution

Solution and Explanation

Define \( x \) as the coded variable with 2013 corresponding to 0. The years are represented as: \( x = -2, -1, 0, 1, 2, 3 \). Let \( y \) represent the production values.
Present the data in a table:
\[\begin{array}{c|c|c|c}\text{Year} & x & y & xy \\\hline2011 & -2 & 210 & -420 \\2012 & -1 & 225 & -225 \\2013 & 0 & 275 & 0 \\2014 & 1 & 220 & 220 \\2015 & 2 & 240 & 480 \\2016 & 3 & 235 & 705 \\\end{array}\]
Step 1: Calculate the sums:
\[\sum x = 3, \quad \sum y = 1405, \quad \sum xy = 760, \quad \sum x^2 = 19\]
The total number of data points is \( n = 6 \).

Step 2: Apply the least squares method to find the trend line:
The trend line equation is given by: \[y = a + bx\]
Determine the slope (\( b \)) and intercept (\( a \)):
\[b = \frac{\sum xy}{\sum x^2} = \frac{760}{19} = 40 \\a = \frac{\sum y}{n} = \frac{1405}{6} \approx 234.17\]
The resulting trend equation is:
\[y = 234.17 + 40x\]
Was this answer helpful?
0