0% found this document useful (0 votes)
28 views9 pages

Demand Forecasting Regression Analysis

The document provides the solution to an exercise involving demand forecasting and linear regression analysis. It includes: 1) A demand plot and linear regression model to forecast future demand. The model is Demand = 42.32 + 4.29(Year). 2) Calculations to determine the prediction interval for forecasts which is between 83.332 and 112.848 for year 13. 3) A coefficient of determination of 0.8922 showing the regression model explains 89.22% of the variation in demand.

Uploaded by

elifatlgan25
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views9 pages

Demand Forecasting Regression Analysis

The document provides the solution to an exercise involving demand forecasting and linear regression analysis. It includes: 1) A demand plot and linear regression model to forecast future demand. The model is Demand = 42.32 + 4.29(Year). 2) Calculations to determine the prediction interval for forecasts which is between 83.332 and 112.848 for year 13. 3) A coefficient of determination of 0.8922 showing the regression model explains 89.22% of the variation in demand.

Uploaded by

elifatlgan25
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

IE 312 Facilities Design and Planning Exercise Set # 1 Sol.

Key

Solution # 1

Part a.
Demand plot is as follows:

110

100

90

80
Demand

70

60

50

40
1 2 3 4 5 6 7 8 9 10 11 12
Year

Part b.
By simple regression model we mean that the forecasting model should be in
the form x̂t = α̂0 + α̂1 t where x̂t : the forecasted demand at time t, α̂0 : the
estimated intercept of the line, and α̂1 : the estimated slope of the line.

n
X 2
SSE = (xt − x̂t )
t=1
n
X 2
SSE = (xt − α̂0 − α̂1 t)
t=1
n
∂SSE X
= −2 (xt − α̂0 − α̂1 t)
∂ α̂0 t=1
n
∂SSE X
= −2 (xt − α̂0 − α̂1 t) t
∂ α̂1 t=1

The minimization of SSE is accomplished by taking the partial derivatives of


SSE with respect to α̂0 and α̂1 and setting the resulting equations equal to zero.
n
X Xn
α̂0 n + α̂1 t = xt
t=1 t=1

1
IE 312 Facilities Design and Planning Exercise Set # 1 Sol. Key

n
X n
X n
X
α̂0 t + α̂1 t2 = txt
t=1 t=1 t=1

t t2 xt txt
1 1 50.7 50.7
2 4 55.4 110.8
3 9 59.6 178.8
4 16 61.0 244.0
5 25 58.0 290.0
6 36 60.5 363.0
7 49 66.0 462.0
8 64 70.5 564.0
9 81 77.8 700.2
10 100 87.6 876.0
11 121 94.8 1042.8
12 144 100.7 1208.4
78 650 842.6 6090.7

12α̂0 + 78α̂1 = 842.6


78α̂0 + 650α̂1 = 6090.7

By solving the equations we get α̂0 = 42.32 and α̂1 = 4.29. So the desired
regression model is x̂t = 42.32 + 4.29t. The demand forecast for year 13 can be
found as x̂13 = 42.32 + 4.29 ∗ 13 = 98.09

Part c.
To construct the prediction interval we need the mean and the variance of the
estimate. The mean of the estimate is given in part (b) as 98.09 and the variance
of the forecast (z periods ahead) for the simple regression model can be found
by using the following formulas.

Pn 2
2 t=1 (xt − x̂t )
S =
n−2
( )
2
1 [(n + z) − t̄]
Sf2 = S 2
1 + + Pn 2
n t=1 (t − t̄)

2
IE 312 Facilities Design and Planning Exercise Set # 1 Sol. Key

t (t − t̄)2 xt x̂t (xt − x̂t )2


1 30.25 50.7 46.61 16.73
2 20.25 55.4 50.90 20.25
3 12.25 59.6 55.19 19.45
4 6.25 61.0 59.48 2.31
5 2.25 58.0 63.77 33.29
6 0.25 60.5 68.06 57.15
7 0.25 66.0 72.35 40.32
8 2.25 70.5 76.64 37.70
9 6.25 77.8 80.93 9.80
10 12.25 87.6 85.22 5.66
11 20.25 94.8 89.51 27.98
12 30.25 100.7 93.80 47.61
78.00 143.00 842.60 842.46 318.26

318.26
S2 = = 31.83
12 − 2
( )
2
1 [(12 + 1) − 6.5]
Sf2 = 31.83 1 + + = 43.88
12 143

x̂n+z − t(1−α)/2,n−2 Sf ≤ xn+z ≤ x̂n+z + t(1−α)/2,n−2 Sf


98.09 − 2.228 ∗ 6.624 ≤ x13 ≤ 98.09 + 2.228 ∗ 6.624
83.332 ≤ x13 ≤ 112.848

Part d.
Coefficient of determination shows the percentage of explained variation in the
dependent variable using the regression model.

n
X n
X n
X
(xt − x̄)2 = (x̂t − x̄)2 + (xt − x̂t )2
t=1 t=1 t=1
| {z } | {z } | {z }
SST otal SSRegression SSError
SSError
r2 = 1−
SST otal

3
IE 312 Facilities Design and Planning Exercise Set # 1 Sol. Key

t (xt − x̄)2 (xt − x̂t )2


1 380.90 16.73
2 219.53 20.25
3 112.71 19.45
4 84.95 2.31
5 149.25 33.29
6 94.41 57.15
7 17.78 40.32
8 0.08 37.70
9 57.51 9.80
10 302.18 5.66
11 604.34 27.98
12 929.23 47.61
2952.88 318.26

318.26
r2 = 1− = 0.8922
2952.88
r = 0.9446

The value of correlation coefficient (close to 1) suggests that the regression


relation may be highly useful.

4
IE 312 Facilities Design and Planning Exercise Set # 1 Sol. Key

Solution # 2

Part a.
y = x/(α0 x − α1 ) is a nonlinear forecast function. In order to minimize the sum
of squared errors (SSE ), we should transform it into a linear model. ý = 1/y
and x́ = 1/x then ý = α0 − α1 x́

n 
X 2
SSE = ýx − ýˆx
x=1
Xn
2
SSE = (ýx − α̂0 + α̂1 x́)
x=1
n
∂SSE X
= −2 (ýx − α̂0 + α̂1 x́)
∂ α̂0 x=1
n
∂SSE X
= 2 (ýx − α̂0 + α̂1 x́) x́
∂ α̂1 x=1

x yx x́ ýx x́2 x́ýx


1 6.0 1.000 0.167 1.000 0.167
2 10.0 0.500 0.100 0.250 0.050
3 13.5 0.333 0.074 0.111 0.025
4 16.5 0.250 0.061 0.063 0.015
5 19.0 0.200 0.053 0.040 0.011
6 21.3 0.167 0.047 0.028 0.008
7 23.4 0.143 0.043 0.020 0.006
8 25.4 0.125 0.039 0.016 0.005
9 27.2 0.111 0.037 0.012 0.004
10 29.0 0.100 0.034 0.010 0.003
2.929 0.654 1.550 0.293

10α̂0 − 2.929α̂1 = 0.654


2.929α̂0 − 1.550α̂1 = 0.293

By solving the equations we get α̂0 = 0.0223 and α̂1 = -0.1471. So the desired
regression model is ýˆx = 0.0223 + 0.1471x́. The demand forecast for year 11 can
be found as ŷ11 = 1/(0.0223 + 0.1471 ∗ 1/11) = 28.0326

5
IE 312 Facilities Design and Planning Exercise Set # 1 Sol. Key

Part b.
x ¯ 2
(ýx − ý) (ýx − ýˆx )2
1 1.025E-02 7.471E-06
2 1.195E-03 1.722E-05
3 7.476E-05 7.512E-06
4 2.325E-05 2.344E-06
5 1.637E-04 8.310E-07
6 3.415E-04 1.734E-08
7 5.150E-04 3.355E-07
8 6.790E-04 1.736E-06
9 8.216E-04 3.533E-06
10 9.576E-04 6.387E-06
1.502E-02 4.739E-05

4.739E − 05
r2 = 1− = 0.9968
1.502E − 02
r = 0.9984

The value of correlation coefficient (close to 1) suggests that the regression


relation may be highly useful.

6
IE 312 Facilities Design and Planning Exercise Set # 1 Sol. Key

Solution # 3

Part a.
Demand plot is as follows:

240

220

200
Demand

180

160

140

120

100

80
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Month

Part b.
Let’s define our regression model as x̂t = α̂0 + α̂1 t + α̂2 sin(2πt/p) where x̂t :
the forecasted demand at time t, α̂0 : intercept of the forecasted demand, α̂1 :
slope of the forecasted demand, α̂2 : amplitude of the forecasted demand, and
p : number of observations in a seasonal path.

n
X 2
SSE = (xt − α̂0 − α̂1 t − α̂2 sin(2πt/p))
t=1
n
∂SSE X
= −2 (xt − α̂0 − α̂1 t − α̂2 sin(2πt/p))
∂ α̂0 t=1
n
∂SSE X
= −2 (xt − α̂0 − α̂1 t − α̂2 sin(2πt/p)) t
∂ α̂1 t=1
n
∂SSE X
= −2 (xt − α̂0 − α̂1 t − α̂2 sin(2πt/p)) sin(2πt/p)
∂ α̂2 t=1

7
IE 312 Facilities Design and Planning Exercise Set # 1 Sol. Key

t xt t2 sin( 2πt
p ) txt tsin( 2πt
p ) xt sin( 2πt
p ) sin( 2πt
p )
2

1 100 1 0.50 100 0.50 50.00 0.25


2 120 4 0.87 240 1.73 103.92 0.75
3 140 9 1.00 420 3.00 140.00 1.00
4 160 16 0.87 640 3.46 138.56 0.75
5 155 25 0.50 775 2.50 77.50 0.25
6 150 36 0.00 900 0.00 0.00 0.00
7 145 49 -0.50 1015 -3.50 -72.50 0.25
8 140 64 -0.87 1120 -6.93 -121.24 0.75
9 135 81 -1.00 1215 -9.00 -135.00 1.00
10 145 100 -0.87 1450 -8.66 -125.57 0.75
11 160 121 -0.50 1760 -5.50 -80.00 0.25
12 200 144 0.00 2400 0.00 0.00 0.00
13 210 169 0.50 2730 6.50 105.00 0.25
14 230 196 0.87 3220 12.12 199.19 0.75
15 250 225 1.00 3750 15.00 250.00 1.00
120 2440 1240 2.37 21735 11.23 529.86 8.00

15α̂0 + 120α̂1 + 2.37α̂2 = 2440


120α̂0 + 1240α̂1 + 11.23α̂2 = 21735
2.37α̂0 + 11.23α̂1 + 8α̂2 = 529.86

By solving the equations we get α̂0 = 88.90, α̂1 = 8.67 and α̂2 = 27.76. So the
desired regression model is x̂t = 88.90 + 8.67t + 27.76 sin(2πt/p).

Part c.
t x̂t (xt − x̄)2 (xt − x̂t )2
1 111.452 3927.111 131.152
2 130.288 1820.444 105.836
3 142.681 513.778 7.187
4 147.635 7.111 152.888
5 146.147 58.778 78.370
6 140.940 160.444 82.084
7 135.733 312.111 85.884
8 134.245 513.778 33.123
9 139.199 765.444 17.633
10 151.592 312.111 43.459
11 170.428 7.111 108.740
12 192.983 1393.778 49.242
13 215.538 2240.444 30.666
14 234.373 4533.778 19.125
15 246.766 7627.111 10.456
24193.333 955.842

955.842
r2 = 1− = 0.9605
24193.333
r = 0.9800

8
IE 312 Facilities Design and Planning Exercise Set # 1 Sol. Key

The value of correlation coefficient (close to 1) suggests that the regression


relation may be highly useful.

Part d.

x̂16 = 88.90 + 8.67 ∗ 16 + 27.76 sin(2π ∗ 16/12) = 251.782


x̂17 = 88.90 + 8.67 ∗ 17 + 27.76 sin(2π ∗ 17/12) = 250.344
x̂18 = 88.90 + 8.67 ∗ 18 + 27.76 sin(2π ∗ 18/12) = 245.162
x̂19 = 88.90 + 8.67 ∗ 19 + 27.76 sin(2π ∗ 19/12) = 239.943
x̂20 = 88.90 + 8.67 ∗ 20 + 27.76 sin(2π ∗ 20/12) = 238.408
x̂21 = 88.90 + 8.67 ∗ 21 + 27.76 sin(2π ∗ 21/12) = 243.289
x̂22 = 88.90 + 8.67 ∗ 22 + 27.76 sin(2π ∗ 22/12) = 255.602
x̂23 = 88.90 + 8.67 ∗ 23 + 27.76 sin(2π ∗ 23/12) = 274.371
x̂24 = 88.90 + 8.67 ∗ 24 + 27.76 sin(2π ∗ 24/12) = 296.896

Common questions

Powered by AI

A high correlation coefficient close to 1 indicates a strong positive relationship between the independent and dependent variables in the regression analysis. This suggests that as one variable increases, the other variable tends to also increase, making the regression model highly reliable for predictive purposes. For example, correlation coefficients of 0.9446 and 0.9984, as found, indicate robust and precise correlations .

In multiple regression models, multicollinearity refers to the presence of high intercorrelations among independent variables, which can inflate standard errors and make it difficult to determine the effect of each predictor. This issue may lead to unstable coefficients and unreliable statistical inferences. It can be detected using variance inflation factors (VIF), where a VIF value exceeding 10 indicates potential multicollinearity. Additionally, analyzing correlation matrices or using principal component analysis (PCA) can help identify and mitigate this problem .

The prediction interval in a simple regression model is constructed using the formula ˆxn+z ± t(1−α)/2,n−2Sf, where ˆxn+z is the forecast for a future period, t(1−α)/2,n−2 is the t-value for the desired confidence level and degrees of freedom, and Sf is the standard deviation of the forecast errors. For example, the prediction interval for year 13 is calculated as 98.09 ± 2.228 * 6.624, resulting in an interval of 83.332 to 112.848 .

The forecast demand for future time periods using both linear and seasonal components is calculated by extending the regression equation that incorporates trend and seasonality, such as ˆxt = ˆα0 + ˆα1t + ˆα2 sin(2πt/p). For each future period, substitute the time value (t) into the equation to estimate demand, taking into account the cyclical sin component to address seasonality. This approach allows for the prediction of patterns combining linear growth and periodic fluctuations .

The coefficient of determination, r², measures the proportion of variance in the dependent variable that is predictable from the independent variable(s) using the regression model. It is calculated as 1 minus the ratio of the sum of squared errors (SSError) to the total sum of squares (SSTotal). A higher r² value, closer to 1, indicates a better fit of the model to the data. For instance, an r² value of 0.8922 suggests that the regression relation is highly useful .

A simple linear regression model for forecasting demand is constructed using the equation ˆxt = ˆα0 + ˆα1t, where ˆxt is the forecasted demand at time t, ˆα0 is the estimated intercept, and ˆα1 is the estimated slope of the line. The model minimizes the sum of squared errors (SSE) by solving the normal equations derived from setting the partial derivatives of SSE with respect to ˆα0 and ˆα1 to zero. For example, the problem-solving results in ˆα0 = 42.32 and ˆα1 = 4.29, making the regression model ˆxt = 42.32 + 4.29t .

The accuracy of a regression model's forecast can be quantitatively determined using metrics such as Mean Squared Error (MSE), Root Mean Squared Error (RMSE), and the prediction interval. MSE and RMSE provide an average squared deviation of actual values from predicted values, with lower values reflecting higher accuracy. Additionally, tight prediction intervals indicate more precise forecasts. For example, in the discussed model, variance calculations and prediction intervals help assess forecast reliability .

The seasonal component in a time series regression model accounts for periodic fluctuations in the data that occur at regular intervals, such as monthly or quarterly. It is incorporated into the forecasting equation through terms like ˆxt = ˆα0 + ˆα1t + ˆα2 sin(2πt/p), where ˆα2 represents the amplitude of the seasonal variation, and p is the number of observations in one seasonal cycle. This method allows the model to capture not just the trend and slope, but also the periodic patterns seen in the data .

Linear regression models assume a straight-line relationship between the dependent and independent variables, characterized by constant slope and intercept, making them straightforward to compute and interpret. Nonlinear regression models, on the other hand, capture more complex relationships, involving curves and slopes that change over the range of data. These models are often more complex to fit due to non-linear parameter estimation and can better capture non-linear patterns where a linear model would be inadequate .

Transforming a nonlinear forecasting model into a linear model involves redefining variables to create a linear relationship. For example, the nonlinear function y = x/(α0x−α1) can be linearized by letting ´y = 1/y and ´x = 1/x, resulting in the linear model ˆ´yx = 0.0223 + 0.1471´x. This transformation is beneficial because it simplifies the estimation process by enabling the use of linear regression methods, which are computationally efficient and well-understood .

You might also like