Assignment1 IO Ahmedawad
-
Upload
ahmed-awad -
Category
Documents
-
view
69 -
download
8
description
Transcript of Assignment1 IO Ahmedawad
Ain Shams University
Faculty of Engineering
Credit Hours Engineering Program
Senior (MANF)
Industrial Engineering
Spring 2014
Assignment (1)
FORECASTING
1) Auto sales at Carmenβs Chevrolet are shown below. Develop a 3-week moving average to
forecast the auto sales at the 7th week
Week 1 2 3 4 5 6 7
Auto Sales 8 10 9 11 10 13 ?
forecast the auto sales at the 7th week by weighting the three weeks as follows:
Weights Applied Period
3 Last week
2 Two weeks ago
1 Three weeks ago
6 Total
Answer:
Using Weighted Moving Average:
πΉπ+1 =β(ππππβπ‘ ππ ππππππ π) Γ (πππ‘π’ππ π£πππ’π ππ ππππππ)
β ππππβπ‘
week Auto Sales
3-Month Weighted Moving Average
1 08 2 10
3 09
4 11 =(3Γ09+2Γ10+1Γ08)/6 9.166667 09 1/6
5 10 =(3Γ11+2Γ09+1Γ10)/6 10.16667 10 1/6
6 13 =(3Γ10+2Γ11+1Γ09)/6 10.16667 10 1/6
7 ?? =(3Γ13+2Γ10+1Γ11)/6 11.66667 11 2/3
Forecasted the auto sales of the 7th week by weighting the three weeks is 11 2/3
y = 0.7714x + 7.4667RΒ² = 0.70217
8
9
10
11
12
13
14
0 1 2 3 4 5 6 7
Au
to S
ales
Week
2) A firm uses simple exponential smoothing with 01. to forecast demand. The forecast for
the week of January 1 was 500 units whereas the actual demand turned out to be 450 units.
Calculate the demand forecast for the week of January 8.
Answer: Using Simple Exponential Smoothing Forecast: πΉπ‘+1 = πΉπ‘ + πΌ(π΄π‘ β πΉπ‘)
New forecast = last periodβs forecast + Ξ± (last periodβs actual demand β last periodβs forecast) πΌ = 0.1 πΉπ‘ = 500 π΄π‘ = 450
πΉπ‘+1 = 500 + 0.1(450 β 500) = 500 β 0.1 Γ 50 = 495 π’πππ‘π 3) Exponential smoothing is used to forecast automobile battery sales. Two value of are
examined, 0 8. and 0 5. . Evaluate the accuracy of each smoothing constant. Which is
preferable? (Assume the forecast for January was 22 batteries.) Actual sales are given
below:
Month Actual
Battery
Sales
Forecast
January 20 22
February 21
March 15
April 14
May 13
June 16
Answer:
Forecasting Performance Measures:
Mean Forecast Error
(MFE or Bias)
Mean Absolute Deviation
(MAD)
Standard Squared Error (MSE)
Mean Absolute Percentage Error
(MAPE)
ππΉπΈ =1
πβ(π΄π‘ β πΉπ‘)
π
π‘=1
ππ΄π· =1
πβ|π΄π‘ β πΉπ‘|
π
π‘=1
πππΈ =1
πβ(π΄π‘ β πΉπ‘)2
π
π‘=1
ππ΄ππΈ =100
πβ |
π΄π‘ β πΉπ‘
π΄π‘|
π
π‘=1
y = -1.2857x + 21RΒ² = 0.5407
10
12
14
16
18
20
22
0 1 2 3 4 5 6 7
Act
ual
Bat
tery
Sal
es
Mounth
495 units
πΆ = π. π
Month Actual Battery
Sales
Rounded Forecast
MFE MAD MSE MAPE
Error
(π΄π‘ β πΉπ‘)
Absolute Error
|π΄π‘ β πΉπ‘|
Error ^2
(π΄π‘ β πΉπ‘)2
Error percentage
|π΄π‘ β πΉπ‘
π΄π‘|
January 20 22 -2 02 04 0.10
February 21 20 1 01 01 0.05
March 15 21 -6 06 36 0.40 April 14 16 -2 02 04 0.14
May 13 14 -1 01 01 0.08 June 16 13 3 03 09 0.19
Summation -7 15 55 0.96 Average -1.17 2.50 9.17 0.16
MFE MAD MSE MAPE
-1.17 2.50 9.17 16 % πΆ = π. π
Month Actual Battery
Sales
Rounded Forecast
MFE MAD MSE MAPE
Error
(π΄π‘ β πΉπ‘)
Absolute Error
|π΄π‘ β πΉπ‘|
Error ^2
(π΄π‘ β πΉπ‘)2
Error percentage
|π΄π‘ β πΉπ‘
π΄π‘|
January 20 22 -2 02 04 0.10
February 21 21 0 00 00 0.00 March 15 21 -6 06 36 0.40
April 14 18 -4 04 16 0.29
May 13 16 -3 03 09 0.23 June 16 15 2 02 04 0.09
Summation -13 17 69 1.11 Average -2.167 2.833 11.500 0.185
MFE MAD MSE MAPE
-2.167 2.833 11.500 18.5 %
MFE MAD MSE MAPE
πΌ = 0.8 -1.17 2.50 9.17 16 %
πΌ = 0.5 -2.167 2.833 11.500 18.6 %
Smoothing constant of πΆ = 0.8 is better than of πΌ = 0.5 because it has a smaller error.
0
5
10
15
20
25
0 1 2 3 4 5 6 7
BA
TTER
Y SA
LES
MOUNTH
actual
0.8
0.5
4) The annual sales of the Engineering Co. are shown in the following table:
Year 1 2 3 4 5 6 7 8 9 10
Sales (1000
L.E.) 45 45.5 50.1 50.6 62 58 64.3 70.2 72.4 75.6
a. Construct a 2 year moving average.
b. Construct a 5 year moving average.
c. Find the regression line.
d. Forecast the sales for year 11.
Show your results graphically.
Answer:
Sales (1000 L.E.)
2 years moving average
5 years average
1 45
2 45.5
3 50.1 =(45.0+45.5)/2 45.25
4 50.6 =(45.5+50.1)/2 47.80
5 62 =(50.1+50.6)/2 50.35
6 58 =(50.6+62.0)/2 56.30 =(45.0+45.5+50.1+50.6+62.0)/5 50.64
7 64.3 =(62.0+58.0)/2 60.00 =(45.5+50.1+50.6+62.0+58.0)/5 53.24
8 70.2 =(58.0+64.3)/2 61.15 =(50.1+50.6+62.0+58.0+64.3)/5 57.00
9 72.4 =(64.3+70.2)/2 67.25 =(50.6+62.0+58.0+64.3+70.2)/5 61.02
10 75.6 =(70.2+72.4)/2 71.30 =(62.0+58.0+64.3+70.2+72.4)/5 65.38
11 - =(72.4+75.6)/2 74.00 =(58.0+64.3+70.2+72.4+75.6)/5 68.10
y = 3.6442x + 39.327RΒ² = 0.9566
30
35
40
45
50
55
60
65
70
75
80
0 2 4 6 8 10 12
Sale
s (1
00
0 L
.E.)
year
Linear Trend Equation:
ππ‘ = π + ππ‘
π = π β π‘π¦ββ π‘ β π¦
π β π‘2β(β π‘)2
π =β π¦βπ β π₯
π
year
Sales (1000 L.E.)
t2 ty
1 45.0 001 045.0 2 45.5 004 091.0
3 50.1 009 150.3
4 50.6 016 202.4
5 62.0 025 310.0
6 58.0 036 348.0 7 64.3 049 450.1
8 70.2 064 561.6 9 72.4 081 651.6
10 75.6 100 756.0
β 55 593.7 385 3566
30
35
40
45
50
55
60
65
70
75
80
0 2 4 6 8 10 12
actual
2
5
π = π β π‘π¦ββ π‘ β π¦
π β π‘2β(β π‘)2 π =
β π¦βπ β π₯
π
π =10(3566) β (55 Γ 593.7)
(10 Γ 385) β (55)2 = 3.6442
π =593.7 β (3.6442 Γ 55)
10= 39.3269
ππ‘ = π + ππ‘
ππ = ππ. ππππ + π. ππππ π
y = 3.6442x + 39.32730
40
50
60
70
80
90
0 2 4 6 8 10 12
Sale
s (1
00
0 L
.E.)
Year
5) The following table shows the demand for the products of the General Batteries Co. and
the number of automobiles in Egypt in the last 10 years.
Year 78 79 80 81 82 83 84 85 86 87
Demand (1000 L.E.) 100 180 240 350 500 470 610 800 900 1000
No of Autos(10,000) 20 55 81 125 190 175 250 320 360 390
a. Find the coefficient of correlation.
b. Forecast the demand for year 88, if the expected number of automobiles is 4,300,000
Answer:
Correlation (r):
π =π(β π₯π¦) β (β π₯)(β π¦)
βπ(β π₯2) β (β π₯)2 β βπ(β π¦2) β (β π¦)2
Year time
period (x)
Demand (1000 L.E.)
(y) x^2 y^2 x*y
78 1 100 1 10000 100 79 2 180 4 32400 360
80 3 240 9 57600 720 81 4 350 16 122500 1400
82 5 500 25 250000 2500
83 6 470 36 220900 2820
84 7 610 49 372100 4270
85 8 800 64 640000 6400 86 9 900 81 810000 8100
87 10 1000 100 1000000 10000
sum 55 5150 385 3515500 36670
n 10
r 0.988851 r^2 0.977827
y = 101.15x - 7830RΒ² = 0.9778
y = 42.545x - 3313.4RΒ² = 0.9798
0
100
200
300
400
500
600
700
800
900
1000
1100
7 6 7 8 8 0 8 2 8 4 8 6 8 8 YEAR
Demand (1000 L.E.)
No of Autos(10,000)
Year time
period (x)
No of Autos(10,000)
(y) X^2 y^2 x*y
78 1 20 1 400 20
79 2 55 4 3025 110 80 3 81 9 6561 243
81 4 125 16 15625 500 82 5 190 25 36100 950
83 6 175 36 30625 1050
84 7 250 49 62500 1750 85 8 320 64 102400 2560
86 9 360 81 129600 3240 87 10 390 100 152100 3900
sum 55 1966 385 538936 14323
n 10 r 0.989825
r^2 0.979754
6) Given:
Year 1 2 3 4 5 6 7 8
Demand 90 100 107 113 123 136 144 155
a)Plot the data and establish a forecast for year 9 using the least square method.
b)Compare forecast using exponential smoothing with Ξ± = 0.15 and F1 = 85 with the
forecasted values obtained by the regression equation established in part (a).
Answer:
a)
year Demand t2 ty
1 90 01 0090
2 100 04 0200 3 107 09 0321
4 113 16 0452
5 123 25 0615 6 136 36 0816
7 144 49 1008 8 155 64 1240
β 36 968 204 4742
π = π β π‘π¦ββ π‘ β π¦
π β π‘2β(β π‘)2 π =
β π¦βπ β π₯
π ππ‘ = π + ππ‘
π =8(4742) β (36 Γ 968)
(8 Γ 204) β (36)2 = 9.19
π =968 β (9.19 Γ 36)
8= 79.65
ππ‘ = 79.65 + 9.19 π‘
y = 9.1905x + 79.643RΒ² = 0.992
60
80
100
120
140
160
180
0 1 2 3 4 5 6 7 8 9
dem
and
year
At t=9
ππ‘ = 79.65 + 9.19 (9) = πππ. ππ
b)
πΉπ‘+1 = πΉπ‘ + πΌ(π΄π‘ β πΉπ‘) New forecast = last periodβs forecast + Ξ± (last periodβs actual demand β last periodβs forecast)
πΌ = 0.15 πΉπ‘ = 85 π΄π‘ = 155
πΉπ‘+1 = 85 + 0.15(155 β 85) = 85 + (0.1 Γ 70) = 95.5
a) using the least square method Demand =162.36 b) using exponential smoothing with Ξ± = 0.15 and F1 = 85 Demand =155
y = 9.1905x + 79.64360
80
100
120
140
160
180
0 2 4 6 8 10
Dem
and
year
7) Use exponential smoothing and the data in the following table to determine the monthly
forecasts (marked by X) using a smoothing factor of 0.1, 0.3 and 0.6
Year Month Demand Ξ±= 0.1 Ξ±= 0.3 Ξ±= 0.6
2002
April 120 120 120 120
May 140 x x x
June 160 x x x
July 110 x x x
August 120 x x x
September 110 x x x
October X x x x
Which is the best smoothing factor of these three?
Answer:
πΉπ‘+1 = πΉπ‘ + πΌ(π΄π‘ β πΉπ‘) New forecast = last periodβs forecast + Ξ± (last periodβs actual demand β last periodβs forecast)
Mean Forecast Error (MFE or Bias)
Mean Absolute Deviation (MAD)
ππΉπΈ =1
πβ(π΄π‘ β πΉπ‘)
π
π‘=1
ππ΄π· =1
πβ|π΄π‘ β πΉπ‘|
π
π‘=1
Standard Squared Error (MSE)
Mean Absolute Percentage Error (MAPE)
πππΈ =1
πβ(π΄π‘ β πΉπ‘)2
π
π‘=1
ππ΄ππΈ =100
πβ |
π΄π‘ β πΉπ‘
π΄π‘|
π
π‘=1
y = -4.5714x + 156.38RΒ² = 0.1892
100
110
120
130
140
150
160
170
3 4 5 6 7 8 9 10
Dem
and
month
Month
Demand
Ξ±= 0.1 error error ^2 Ξ±= 0.3 error error^2 Ξ±= 0.6 error error^2
4 120 120 0.00 0000.00 120.00 0.00 0000.00 120 0.00 0.00
5 140 120 20.00 0400.00 120.00 20.00 0400.00 120.00 20.00 400.00
6 160 122 38.00 1444.00 126.00 34.00 1156.00 132.00 28.00 784.00
7 110 125.8 -15.80 0249.64 136.20 -26.20 0686.44 148.80 -38.80 1505.44
8 120 124.22 -4.22 0017.81 128.34 -8.34 0069.56 125.52 -5.52 30.47
9 110 123.798 -13.80 0190.38 125.84 -15.84 0250.84 122.21 -12.21 149.04
10 X 122.42 121.09 114.88
Summation 24.18 2301.83 3.62 2562.84 -8.53 2868.95
Error
MAD 15.303 MAD 17.396 MAD 17.421
MSE 383.639 MSE 427.140 MSE 478.158
MAPE 11.41 % MAPE 13.45 % MAPE 13.45 %
Smoothing constant of Ξ± = 0.1 is preferred to that of Ξ± = 0.3 and Ξ± = 0.5 because it has a smaller error.
90
100
110
120
130
140
150
160
170
3 4 5 6 7 8 9 10 11
actual
0.1
0.3
0.6
8) The table below shows the demand for a particular brand of fax machine in a department
store in each of the last twelve months.
Month 1 2 3 4 5 6 7 8 9 10 11 12
Demand 12 15 19 23 27 30 32 33 37 41 49 58
Calculate the four month moving average for months 4 to 12. What would be your forecast
for the demand in month 13?
Apply exponential smoothing with a smoothing constant of 0.2 to derive a forecast for the
demand in month 13.
Which of the two forecasts for month 13 do you prefer and why?
What other factors, not considered in the above calculations, might influence demand for the
fax machine in month 13?
For =0.2, compute 2S control limits (confidence level 95%). Plot the data and check that
all errors are within the limits.
Answer:
a) The four month moving average:
Month Demand four month
moving average
error abs error ^2 |π΄π‘ β πΉπ‘
π΄π‘|
1 12
2 15
3 19
4 23
5 27 =(12+15+19+23)/4 17.250 09.750 9.75 095.0625 0.361111
6 30 =(15+19+23+27)/4 21.000 09.000 9.00 081.0000 0.300000
7 32 =(19+23+27+30)/4 24.750 07.250 7.25 052.5625 0.226563
8 33 =(23+27+30+32)/4 28.000 05.000 5.00 025.0000 0.151515
9 37 =(27+30+32+33)/4 30.500 06.500 6.50 042.2500 0.175676
10 41 =(30+32+33+37)/4 33.000 08.000 8.00 064.0000 0.195122
11 49 =(32+33+37+41)/4 35.750 13.250 13.25 175.5625 0.270408
12 58 =(33+37+41+49)/4 40.000 18.000 18.00 324.0000 0.310345
13 - =(37+41+49+58)/4 46.250
Error Calculations
Sum 76.750 76.750 859.4375 1.990739
Average n=8
9.594
MAD
9.594
MSE
107.430
MAPE 0.249
=24.9 %
y = 3.6923x + 7.3333RΒ² = 0.9582
0
10
20
30
40
50
60
70
0 2 4 6 8 10 12 14
Dem
and
Month
The forecast for month 13 = 46.25
b) Exponential smoothing:
πΉπ‘+1 = πΉπ‘ + πΌ(π΄π‘ β πΉπ‘) New forecast = last periodβs forecast + Ξ± (last periodβs actual demand β last periodβs forecast)
πΌ = 0.2 πΉπ‘ = 12
Month Demand Exponential smoothing
error abs error ^2 |π΄π‘ β πΉπ‘
π΄π‘|
1 12 2 15 12.000 03.000 03.000 009.000 0.200
3 19 12.600 06.400 06.400 040.960 0.337 4 23 13.880 09.120 09.120 083.174 0.397
5 27 15.704 11.296 11.296 127.600 0.418 6 30 17.963 12.037 12.037 144.885 0.401
7 32 20.371 11.629 11.629 135.244 0.363
8 33 22.696 10.304 10.304 106.163 0.312 9 37 24.757 12.243 12.243 149.887 0.331
10 41 27.206 13.794 13.794 190.282 0.336 11 49 29.965 19.035 19.035 362.347 0.388
12 58 33.772 24.228 24.228 587.012 0.418
13 - 38.617
Error Calculations
Sum 133.087 133.0867 1936.554 3.902151
Average n=11
12.099
MAD
12.099
MSE
176.050
MAPE 0.355 35.5 %
To compare the two forecasts we calculate the mean squared deviation (MSD) and Mean Absolute Percentage Error (MAPE).
(MSD) (MAPE)
Four month moving average 107.430 24.9 %
Exponential smoothing 176.050 35.5 %
Four month moving average is preferred, because it has a smaller error.
Other factors:
Seasonal Demand Price Changes, Both This Brand And Other Brands General Economic Situation New Technology Advertising
0
10
20
30
40
50
60
70
0 2 4 6 8 10 12 14
DEM
AN
D
MONTH
Series1
4 month
Exponential
For four month moving average:
Month 1 2 3 4 5 6 7 8 9 10 11 12
Sum Demand 12 15 19 23 27 30 32 33 37 41 49 58
four month moving average 17.25 21.00 24.75 28.00 30.50 33.00 35.75 40.00
Error 9.75 9.00 7.25 5.00 6.50 8.00 13.25 18.00 76.75
Error -Average 0.16 -0.59 -2.34 -4.59 -3.09 -1.59 3.66 8.41 0
(Error βAverage)2 0.02 0.35 5.49 21.10 9.57 2.54 13.37 70.67 123.12
Average error = β πππππ
π=
76.75
8= 9.594
π = βπππΈ = β123.12
8 β 1= 4.19
0.00 Β± 2π = 0 Β± (2 Γ 4.19) = 0 Β± 8.39 πΏπΆπΏ = β8.39 ππΆπΏ = +8.39
0.16-0.59
-2.34
-4.59
-3.09
-1.59
3.66
8.41
y = - 8.39
y = 8.39
-10.00
-8.00
-6.00
-4.00
-2.00
0.00
2.00
4.00
6.00
8.00
10.00
3 4 5 6 7 8 9 10 11 12 13
9) Quarterly unit demand for a product are given below:
Year Winter Spring Summer Autumn
2001 190 350 250 200
2002 250 400 300 150
2003 300 340 260 180
2004 280 400 220 200
2005 350 420 340 240
Determine a seasonal index, and establish a forecast for each quarter of the next year.
Answer:
10) A gift shop in a tourist center is open on weekends (Friday, Saturday, and Sunday). The owner
manager hopes to improve scheduling of part time employees by determining seasonal
relatives for each of these days. Data on recent activity at the store have been tabulated and
are shown in the table below.
-Develop seasonal relatives for the shop.
-Forecast the sales for week 7.
Week
1 2 3 4 5 6
Friday 149 154 152 150 159 163
Saturday 250 255 260 268 273 276
Sunday 166 162 171 173 176 183
Answer: