[go: up one dir, main page]

0% found this document useful (0 votes)
15 views14 pages

bài tập Kinh tế lượng week 10

The document discusses time series forecasting methods including moving averages and exponential smoothing, highlighting their patterns and Mean Squared Errors (MSE). It compares the accuracy of different moving average lengths and smoothing parameters, concluding that the three-week moving average provides the most accurate forecasts. Additionally, it presents calculations for various weeks and months, demonstrating the application of these forecasting techniques.

Uploaded by

dungnnx234101e
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)
15 views14 pages

bài tập Kinh tế lượng week 10

The document discusses time series forecasting methods including moving averages and exponential smoothing, highlighting their patterns and Mean Squared Errors (MSE). It compares the accuracy of different moving average lengths and smoothing parameters, concluding that the three-week moving average provides the most accurate forecasts. Additionally, it presents calculations for various weeks and months, demonstrating the application of these forecasting techniques.

Uploaded by

dungnnx234101e
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
You are on page 1/ 14

5/804

(a) Time series plot and pattern

Pattern observation:

-​ The data shows irregular fluctuations.​

-​ There is no clear trend or seasonality.​

-​ This type of pattern is often referred to as random variation

(b) Three-week moving average and MSE

Week Value MA Forecast

4 11 (18+13+16)/3 = 15.67

5 17 (13+16+11)/3 = 13.33

6 14 (16+11+17)/3 = 14.67

7 ? (11+17+14)/3 = 14.00

MSE (Mean Squared Error):

(c ) Exponential smoothing with α = 0.2

Ft​=αAt−1​+(1−α)Ft−1​
Let the initial forecast F1=A1=18

Week Actual Forecast Ft

1 18 18.00 (initial)

2 13 18.00

3 16 0.2×13 + 0.8×18 = 17.00

4 11 0.2×16 + 0.8×17.00 = 16.80

5 17 0.2×11 + 0.8×16.80 = 15.44

6 14 0.2×17 + 0.8×15.44 = 15.55

7 ? 0.2×14 + 0.8×15.55 = 15.24

(d) Comparison of MA vs. Exponential smoothing


Method MSE Week 7
Forecast

Moving Average (3-week) 11.90 14.00

Exponential Smoothing 12.89 15.24

Conclusion:

-​ The three-week moving average method provides a lower MSE → more accurate.​

-​ This is likely because moving average smooths out noise better when no strong trend
exists.

(e) Exponential Smoothing with α = 0.4

Week Actual Forecast Ft

1 18 18.00 (initial)

2 13 18.00

3 0.4×13 + 0.6×18 = 15.00

4 0.4×16 + 0.6×15 = 15.40

5 0.4×11 + 0.6×15.4 = 13.64

6 0.4×17 + 0.6×13.64 = 14.78


7 ? 0.4×14 + 0.6×14.78 = 14.47

7/805

calculate the 4-week moving average from week 5 onward:

(a)​Moving average, Time series smoothing


●​ Week 5:

(17+21+19+23)/4=80/4=20.00
(17+21+19+23)/4=80/4=20.00

●​ Week 6:

(21+19+23+18)/4=81/4=20.25
(21+19+23+18)/4=81/4=20.25

●​ Week 7:

(19+23+18+16)/4=76/4=19.00
(19+23+18+16)/4=76/4=19.00

●​ Week 8:

(23+18+16+20)/4=77/4=19.25
(23+18+16+20)/4=77/4=19.25

●​ Week 9:

(18+16+20+18)/4=72/4=18.00
(18+16+20+18)/4=72/4=18.00
●​ Week 10:

(16+20+18+17)/4=71/4=17.75
(16+20+18+17)/4=71/4=17.75

●​ Week 11:

(20+18+17+19)/4=74/4=18.50
(20+18+17+19)/4=74/4=18.50

●​ Week 12:

(18+17+19+20)/4=74/4=18.50
(18+17+19+20)/4=74/4=18.50

calculate the 5-week moving average from week 6 onward

●​ Week 6:

(17+21+19+23+18)/5=98/5=19.60
(17+21+19+23+18)/5=98/5=19.60

●​ Week 7:

(21+19+23+18+16)/5=97/5=19.40
(21+19+23+18+16)/5=97/5=19.40

●​ Week 8:

(19+23+18+16+20)/5=96/5=19.20
(19+23+18+16+20)/5=96/5=19.20

●​ Week 9:

(23+18+16+20+18)/5=95/5=19.00
(23+18+16+20+18)/5=95/5=19.00

●​ Week 10:

(18+16+20+18+17)/5=89/5=17.80
(18+16+20+18+17)/5=89/5=17.80
●​ Week 11:

(16+20+18+17+19)/5=90/5=18.00
(16+20+18+17+19)/5=90/5=18.00

●​ Week 12:

(20+18+17+19+20)/5=94/5=18.80
(20+18+17+19+20)/5=94/5=18.80

(b)​
●​ Four-week Moving Average Errors and MSE

Sum = 4.00+18.06+1.00+1.56+1.00+1.56+2.25+0.25 = 29.68

MSE4 = 29.68/8 = 3.71

●​ Five-week Moving Average Errors and MSE

Sum = 12.96+0.36+1.44+4.00+1.44+4.00+0.64 = 24.84

MSE5 = 24.84/7 = 3.55

(c )
Compare the MSE values

-​ 3-week moving average MSE = 10.22 (given)


-​ 4-week moving average MSE = 3.71
-​ 5-week moving average MSE = 3.55

The moving average with the lowest MSE provides the best fit -> Lowest is 5-week moving
average (MSE = 3.55)

11/806

(a)​
-​ The percentages range between 80% and 85%, showing small fluctuations around a
central value.
-​ There is no clear upward or downward trend, and no strong seasonality.
-​ The data appears to be relatively stable with minor random variations.

(b)

Three-Month Moving Average

For month 4 and onward, compute the moving averages:

-​ Forecast for Month 4 = (80+82+84)/3 = 82.0


-​ Forecast for Month 5 = (82+84+83)/3 = 83.0
-​ Forecast for Month 6 = (84+83+83)/3 ≈ 83.33
-​ Forecast for Month 7 = (83+83+84)/3 ≈ 83.33
-​ Forecast for Month 8 = (83+84+85)/3 = 84.0
-​ Forecast for Month 9 = (84+85+84)/3 ≈ 84.33
-​ Forecast for Month 10 = (85+84+82)/3 ≈ 83.67
-​ Forecast for Month 11 = (84+82+83)/3 = 83.0
-​ Forecast for Month 12 = (82+83+84)/3 = 83.0

Sum of squared errors ≈ 11.12

MSE (3MA) ≈ 11.12/9 ≈ 1.24

Exponential Smoothing with α=0.2 using the formula: Ft+1=αXt+(1−α)


with initial forecast F1=80

Compute forecasts sequentially:

●​ F2=0.2×80+0.8×80=80.00
●​ F3=0.2×82+0.8×80=80.4
●​ F4=0.2×84+0.8×80.4=81.12(Error: 83−81.12=1.88, Squared Error≈3.53)
●​ F5=0.2×83+0.8×81.12≈81.50
●​ F6=0.2×83+0.8×81.50=81.80(Error for Month 6: 84−81.80=2.20, Squared
Error≈4.84)
●​ F7=0.2×84+0.8×81.80=82.24 (Error:85−82.24=2.76, Squared Error ≈7.62)
●​ F8=0.2×85+0.8×82.24≈82.79 (Error:84−82.79≈1.21, Squared Error≈1.46)
●​ F9=0.2×84+0.8×82.79≈83.03 (Error: 82−83.03≈−1.03, Squared Error ≈1.06)
●​ F10=0.2×82+0.8×83.03≈82.83 (Error: 83−82.83≈0.17, Squared Error ≈0.03)
●​ F11=0.2×83+0.8×82.83≈82.86 (Error: 84−82.86≈1.14, Squared Error ≈1.30)
●​ F12=0.2×84+0.8×82.86≈83.09 (Error: 83−83.09≈−0.09, Squared Error≈0.008)

Sum of squared errors ≈22.10

MSE (Exponential Smoothing) ≈22.10/9≈2.46


Since the three-month moving average method has an MSE of approximately 1.24 compared
to 2.46 for exponential smoothing, the three-month moving average provides more accurate
forecasts.

(c )

-​ Three-Month Moving Average Forecast: Use Months 10, 11, and 12:

83+84+833 ≈ 83.33.

-​ Exponential Smoothing Forecast: Using the last computed forecast:

F13=0.2×83+0.8×83.09 ≈ 83.07

Using the more accurate method (moving average), the forecast for next month is 83.33.

13/806

a)

-​ Three-Month Moving Average Forecasts:

Month 4: (240 + 350 + 230) / 3 = 273.33

Month 5: (350 + 230 + 260) / 3 = 280

Month 6: (230 + 260 + 280) / 3 = 256.67

Month 7: (260 + 280 + 320) / 3 = 286.67

Month 8: (280 + 320 + 220) / 3 = 273.33

Month 9: (320 + 220 + 310) / 3 = 283.33

Month 10: (220 + 310 + 240) / 3 = 256.67

Month 11: (310 + 240 + 310) / 3 = 286.67

Month 12: (240 + 310 + 240) / 3 = 263.33

-​ Errors:

Month 4: 260 - 273.33 = -13.33

Month 5: 280 - 280 = 0

Month 6: 320 - 256.67 = 63.33


Month 7: 220 - 286.67 = -66.67

Month 8: 310 - 273.33 = 36.67

Month 9: 240 - 283.33 = -43.33

Month 10: 310 - 256.67 = 53.33

Month 11: 240 - 286.67 = -46.67

Month 12: 230 - 263.33 = -33.33

MSE: [(-13.33^2) + (0^2) + 63.33^2 + (-66.67^2) + 36.67^2 + (-43.33²) + 53.33^2 +


(-46.67^2) + (-33.33^2)] / 9 = 2221.23

-​ Exponential Smoothing Forecasts (α = 0.2):

F2 = 0.2 * 350 + 0.8 * 240 = 70 + 192 = 262

F3 = 0.2 * 230 + 0.8 * 262 = 46 + 209.6 = 255.6

F4 = 0.2 * 260 + 0.8 * 255.6 = 52 + 204.48 = 256.48

F5 = 0.2 * 280 + 0.8 * 256.48 = 56 + 205.184 = 261.184

F6 = 0.2 * 320 + 0.8 * 261.184 = 64 + 208.9472 = 272.9472

F7 = 0.2 * 220 + 0.8 * 272.9472 = 44 + 218.35776 = 262.35776

F8 = 0.2 * 310 + 0.8 * 262.35776 = 62 + 209.886208 = 271.886208

F9 = 0.2 * 240 + 0.8 * 271.886208 = 48 + 217.5089664 = 265.5089664

F10 = 0.2 * 310 + 0.8 * 265.5089664 = 62 + 212.40717312 = 274.40717312

F11 = 0.2 * 240 + 0.8 * 274.40717312 = 48 + 219.525738496 = 267.525738496

F12 = 0.2 * 230 + 0.8 * 267.525738496 = 46 + 214.020590797 = 260.020590797

-​ Errors:

Month 2: 350 - 262 = 88

Month 3: 230 - 255.6 = -25.6

Month 4: 260 - 256.48 = 3.52

Month 5: 280 - 261.184 = 18.816


Month 6: 320 - 272.9472 = 47.0528

Month 7: 220 - 262.35776 = -42.35776

Month 8: 310 - 271.886208 = 38.113792

Month 9: 240 - 265.5089664 = -25.5089664

Month 10: 310 - 274.40717312 = 35.59282688

Month 11: 240 - 267.525738496 = -27.525738496

Month 12: 230 - 260.020590797 = -30.020590797

MSE: [88^2 + (-25.6^2) + 3.52^2 + 18.816^2 + 47.0528^2 + (-42.35776^2) + 38.113792^2 +


(-25.5089664^2) + 35.59282688^2 + (-27.525738496^2) + (-30.020590797^2)] / 11
=1636.55

Comparison: Exponential smoothing with α = 0.2 (MSE =1636.55) provides more accurate
forecasts than the three-month moving average (MSE= 2221.23) based on MSE

c)

Three-Month Moving Average Forecast: (310 + 240 + 230) / 3 = 260

Exponential Smoothing Forecast (α = 0.2): F13 = 0.2 * 230 + 0.8 * 260.020590797 = 46 +


208.016472638 = 254.016472638

Forecast: The exponential smoothing forecast of 254.02 is recommended due to its lower
MSE

15/806

b)

F2 = 0.2 * 7.40 + 0.8 * 7.35 = 1.48 + 5.88 = 7.36

F3 = 0.2 * 7.55 + 0.8 * 7.36 = 1.51 + 5.888 = 7.398

F4 = 0.2 * 7.56 + 0.8 * 7.398 = 1.512 + 5.9184 = 7.4304

F5 = 0.2 * 7.60 + 0.8 * 7.4304 = 1.52 + 5.94432 = 7.46432

F6 = 0.2 * 7.52 + 0.8 * 7.46432 = 1.504 + 5.971456 = 7.475456

F7 = 0.2 * 7.52 + 0.8 * 7.475456 = 1.504 + 5.9803648 = 7.4843648

F8 = 0.2 * 7.70 + 0.8 * 7.4843648 = 1.54 + 5.98749184 = 7.52749184


F9 = 0.2 * 7.62 + 0.8 * 7.52749184 = 1.524 + 6.021993472 = 7.545993472

F10 = 0.2 * 7.55 + 0.8 * 7.545993472 = 1.51 + 6.0367947776 = 7.5467947776

F11 = 0.2 * 7.55 + 0.8 * 7.5467947776 = 1.51 + 6.03743582208 = 7.54743582208

c)

F2 = 0.3 * 7.40 + 0.7 * 7.35 = 2.22 + 5.145 = 7.365

F3 = 0.3 * 7.55 + 0.7 * 7.365 = 2.265 + 5.1555 = 7.4205

F4 = 0.3 * 7.56 + 0.7 * 7.4205 = 2.268 + 5.19435 = 7.46235

F5 = 0.3 * 7.60 + 0.7 * 7.46235 = 2.28 + 5.323645 = 7.603645

F6 = 0.3 * 7.52 + 0.7 * 7.603645 = 2.256 + 5.3225515 = 7.5785515

F7 = 0.3 * 7.52 + 0.7 * 7.5785515 = 2.256 + 5.30498605 = 7.56098605

F8 = 0.3 * 7.70 + 0.7 * 7.56098605 = 2.31 + 5.292690235 = 7.602690235

F9 = 0.3 * 7.62 + 0.7 * 7.602690235 = 2.286 + 5.3218831645 = 7.6078831645

F10 = 0.3 * 7.55 + 0.7 * 7.6078831645 = 2.265 + 5.32551821515 = 7.59051821515

F11 = 0.3 * 7.55 + 0.7 * 7.59051821515 = 2.265 + 5.313362650615 = 7.578362650615

d)

Errors for α = 0.2:

Week 2: 7.40 - 7.36 = 0.04

Week 3: 7.55 - 7.398 = 0.152

Week 4: 7.56 - 7.4304 = 0.1296

Week 5: 7.60 - 7.46432 = 0.13568

Week 6: 7.52 - 7.475456 = 0.044544

Week 7: 7.52 - 7.4843648 = 0.0356352

Week 8: 7.70 - 7.52749184 = 0.17250816

Week 9: 7.62 - 7.545993472 = 0.074006528

Week 10: 7.55 - 7.5467947776 = 0.0032052224


-​ MSE for α = 0.2: (0.04^2 + 0.152^2 + 0.1296^2 + 0.13568^2 + 0.044544^2 +
0.0356352^2 + 0.17250816^2 + 0.074006528^2 + 0.0032052224^2) / 9= 0.010978
-​ Errors for α = 0.3:

Week 2: 7.40 - 7.365 = 0.035

Week 3: 7.55 - 7.4205 = 0.1295

Week 4: 7.56 - 7.46235 = 0.09765

Week 5: 7.60 - 7.603645 = -0.003645

Week 6: 7.52 - 7.5785515 = -0.0585515

Week 7: 7.52 - 7.56098605 = -0.04098605

Week 8: 7.70 - 7.602690235 = 0.097309765

Week 9: 7.62 - 7.6078831645 = 0.0121168355

Week 10: 7.55 - 7.59051821515 = -0.04051821515

-​ MSE for α = 0.3: [0.035^2 + 0.1295^2 + 0.09765^2 + (-0.003645^2) +


(-0.0585515^2) + (-0.04098605^2) + (0.097309765^2) + (0.0121168355^2) +
(-0.04051821515^2)] / 9= 0.004988
-​ Comparison: MSE for α = 0.3 (= 0.004988) is lower than MSE for α = 0.2
(=0.010978), indicating α = 0.3 provides more accurate forecasts
-​ Forecast for Week 11: Use α = 0.3 forecast: 7.578362650615

You might also like