---
title: "Linear trend regression and forecast error"
subject: "Industrial Engineering and Management"
chapter: 6
key: "semester_6/industrial_engineering_and_management:linear-regression-trend-forecast"
source: https://www.bctengineer.com/q/semester_6/industrial_engineering_and_management/linear-regression-trend-forecast
site: BCT Engineering
---

# Linear trend regression and forecast error

Industrial Engineering and Management · Chapter 6: Forecasting

- Asked in: year not given, 8 marks
- Video: [03_03_P6 Demand Forecasting Using Linear Trend Line or Regression Equation (Using Excel)](https://www.youtube.com/watch?v=uhG9R_BeszY) — Industrial Engineering and Manufacturing
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/industrial_engineering_and_management/linear-regression-trend-forecast
- Whole chapter: https://www.bctengineer.com/md/semester_6/industrial_engineering_and_management/chapter-6

## Question

Annual demand (in thousand units) for a product over six years is: Year 1: 42, Year 2: 45, Year 3: 51, Year 4: 53, Year 5: 59, Year 6: 62. (a) Fit a straight-line trend $y = a + bx$ by the least squares method. (b) Forecast the demand for years 7 and 8. (c) Compute MAD, MSE and MAPE of the fitted line, and comment on the fit. Also name the causal quantitative techniques and the difference from time-series methods.

## Short answer

Least squares trend: y = 37.6 + 4.114x (thousand units). Year7 forecast 66.4, year8 forecast 70.5. MAD = 0.72, MSE = 0.63, MAPE = 1.4%. Causal methods use regression on related variables; time-series uses only historic values of the variable itself.

## Answer

#### (a) Least squares line
Take $x$ = year number, $n = 6$.

| $x$ | $y$ | $xy$ | $x^2$ |
|---|---|---|---|
| 1 | 42 | 42 | 1 |
| 2 | 45 | 90 | 4 |
| 3 | 51 | 153 | 9 |
| 4 | 53 | 212 | 16 |
| 5 | 59 | 295 | 25 |
| 6 | 62 | 372 | 36 |
| **21** | **312** | **1164** | **91** |

$$
b = \frac{n\sum xy - \sum x \sum y}{n\sum x^2 - (\sum x)^2} = \frac{6(1164) - 21(312)}{6(91) - 441} = \frac{6984 - 6552}{105} = 4.114
$$

$$
a = \bar{y} - b\bar{x} = 52 - 4.114(3.5) = 37.6
$$

Trend line: $y = 37.6 + 4.114x$ (demand rises by about 4.1 thousand units per year).

#### (b) Forecasts
- Year 7: $37.6 + 4.114(7) = 66.4$ thousand units
- Year 8: $37.6 + 4.114(8) = 70.5$ thousand units

#### (c) Forecast error of the fit

| $x$ | Actual | Fitted | Error |
|---|---|---|---|
| 1 | 42 | 41.71 | 0.29 |
| 2 | 45 | 45.83 | -0.83 |
| 3 | 51 | 49.94 | 1.06 |
| 4 | 53 | 54.06 | -1.06 |
| 5 | 59 | 58.17 | 0.83 |
| 6 | 62 | 62.29 | -0.29 |

- MAD $= 4.34/6 = 0.72$ thousand units
- MSE $= 3.77/6 = 0.63$
- MAPE $= 1.4\%$

The errors are small and change sign, so the straight line fits the data well (correlation coefficient $r \approx 0.994$). Forecasting two years ahead is reasonable, but the line should be revised as new data arrive.

#### Causal methods
**Causal (associative) techniques** forecast a variable from other variables that influence it, for example demand of cement from construction activity, using simple or multiple regression and correlation, or econometric models. **Time-series methods** (moving average, exponential smoothing, trend) use only the past values of the variable itself.

**Answer: $y = 37.6 + 4.114x$; forecasts 66.4 (year 7) and 70.5 (year 8) thousand units; MAD = 0.72, MSE = 0.63, MAPE = 1.4%.**

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which expression gives the slope b of the least squares line?
   A. (n sum xy - sum x sum y)/(n sum x^2 - (sum x)^2)
   B. (sum x sum y)/(n sum xy)
   C. sum y / sum x
   D. (sum x^2 - sum xy)/n
   Answer: A. With the sums given: (6984 - 6552)/105 = 4.114 thousand units per year. (Key point: Slope formula)

2. What is the fitted trend line?
   A. y = 52 + 3.5x
   B. y = 4.114 + 37.6x
   C. y = 37.6 + 4.114x
   D. y = 21 + 312x
   Answer: C. a = ybar - b xbar = 52 - 4.114(3.5) = 37.6, so y = 37.6 + 4.114x. (Key point: Trend line)

3. What is the forecast for year 8?
   A. 66.4
   B. 74.6
   C. 70.5
   D. 62.3
   Answer: C. 37.6 + 4.114 x 8 = 70.5 thousand units. (Key point: Forecast)

4. How do causal methods differ from time-series methods?
   A. Causal use only past values of the variable; time series use other variables
   B. Causal forecast from other influencing variables (regression); time series use only past values of the variable itself
   C. They are identical
   D. Causal methods are qualitative opinions
   Answer: B. E.g. cement demand from construction activity is causal; moving average and exponential smoothing are time-series. (Key point: Causal vs time series)

## Related in Industrial Engineering and Management

- [ABC analysis from annual consumption data](https://www.bctengineer.com/question.md?key=semester_6%2Findustrial_engineering_and_management%3Aabc-analysis-of-inventory-items) — Industrial Engineering and Management, chapter 4
- [Forecasting by moving average and smoothing](https://www.bctengineer.com/question.md?key=semester_6%2Findustrial_engineering_and_management%3Amoving-average-and-exponential-smoothing) — Industrial Engineering and Management, chapter 6
- [Assembly line balancing with cycle time](https://www.bctengineer.com/question.md?key=semester_6%2Findustrial_engineering_and_management%3Aassembly-line-balancing-problem) — Industrial Engineering and Management, chapter 2
- [Break-even cost comparison of three sites](https://www.bctengineer.com/question.md?key=semester_6%2Findustrial_engineering_and_management%3Abreak-even-analysis-plant-location) — Industrial Engineering and Management, chapter 2
- [EOQ, total cost and reorder point numerical](https://www.bctengineer.com/question.md?key=semester_6%2Findustrial_engineering_and_management%3Aeoq-numerical-reorder-point) — Industrial Engineering and Management, chapter 4

## Related in other subjects

- [Fit straight line: humidity and moisture](https://www.bctengineer.com/question.md?key=semester_5%2Fprobability_and_statistics%3Ahumidity-moisture-straight-line-fit) — Probability and Statistics, chapter 5
- [Forecast CFL demand for next five years](https://www.bctengineer.com/question.md?key=semester_6%2Fengineering_economics%3Aforecast-cfl-demand-five-years) — Engineering Economics, chapter 1
- [Regression equation for demand of fish](https://www.bctengineer.com/question.md?key=semester_6%2Fengineering_economics%3Aregression-demand-fish-price-60) — Engineering Economics, chapter 1
- [Population forecast 2021 census, 2024 base year](https://www.bctengineer.com/question.md?key=semester_5%2Fwater_supply_engineering%3Apop-b81) — Water Supply Engineering, chapter 3
