17
By: W Jorge Sitkewich, Mathematics and Statistics Adjunct Instructor San Jose City College. [email protected] Teaching Seasonal Forecasting to Students of Statistics

By: W Jorge Sitkewich, Mathematics and Statistics Adjunct Instructor San Jose City College. [email protected]@ieee.org Teaching Seasonal Forecasting

Embed Size (px)

Citation preview

Page 1: By: W Jorge Sitkewich, Mathematics and Statistics Adjunct Instructor San Jose City College. jsitke@ieee.orgjsitke@ieee.org Teaching Seasonal Forecasting

By: W Jorge Sitkewich,

Mathematics and Statistics Adjunct Instructor

San Jose City College. [email protected]

Teaching Seasonal Forecasting to Students of

Statistics

Page 2: By: W Jorge Sitkewich, Mathematics and Statistics Adjunct Instructor San Jose City College. jsitke@ieee.orgjsitke@ieee.org Teaching Seasonal Forecasting

Agenda

I. Why is forecasting important?

II. Use a project to teach Time Series Seasonal Forecasting.

III. Phases (milestones) of the project and Rubric(handout).

IV. Use the Method of “Ratio-to-Moving-Averages” to obtain a Forecast.

V. Forecasting errors.

VI. Other methods typically used and References.

VII. Conclusions and recommendations.04/20/23 2

Page 3: By: W Jorge Sitkewich, Mathematics and Statistics Adjunct Instructor San Jose City College. jsitke@ieee.orgjsitke@ieee.org Teaching Seasonal Forecasting

I. Why is forecasting important?I. Why is forecasting important?

• Forecasting is a necessary tool in any business to align the resources to the estimated demand.

• Several Forecasting methods are in use in Statistics and most use Regression and Modeling.

• One of the Projects assigned to students of Statistics consists of Seasonal Forecasting a Time Series by the Ratio-to-Moving-Average Method.

• The example we will demonstrate is about predicting the Electric Power consumption of the USA using data available from EIA government documents. See references.

Table 7b. “U.S. Regional Electricity Retail Sales”

04/20/23 3

Page 4: By: W Jorge Sitkewich, Mathematics and Statistics Adjunct Instructor San Jose City College. jsitke@ieee.orgjsitke@ieee.org Teaching Seasonal Forecasting

II. II. Use a project to teach Forecasting

• Students form Teams, Select the Problem,

and learn the basics of Project Management.

• In most Statistics Courses there are usually

two or three key application concepts that are

left for the end of the course, and not taught

in detail.

• The Project of Seasonal Forecasting provides

the learning environment and engages the

students in team work to learn one the key

applications in forecasting a time series.04/20/23 4

Page 5: By: W Jorge Sitkewich, Mathematics and Statistics Adjunct Instructor San Jose City College. jsitke@ieee.orgjsitke@ieee.org Teaching Seasonal Forecasting

III. Phases of the Project and RubricIII. Phases of the Project and Rubric

Phase 1. Select the specific project and justify it as a valid team activity for this course.

Phase 2. Estimate the Schedule and adjust the Project Scope for a duration of four calendar weeks.

Phase 3. Execute the Method using available Technology. Generate spread sheets and Charts.

Phase 4. Estimate errors of the Model and provide Conclusions and References.

Phase 5. Create PowerPoint Summary Presentation. Each team presents their summary as a 10 minute presentation to conclude the Project.

Refer to the Rubric provided in Part A handout #1

04/20/23 5

Page 6: By: W Jorge Sitkewich, Mathematics and Statistics Adjunct Instructor San Jose City College. jsitke@ieee.orgjsitke@ieee.org Teaching Seasonal Forecasting

IV. Time Series ComponentsIV. Time Series Components

Components• Trend (Linear or Power Model)• Seasonal • Cyclical • Random error

Prediction Horizon• Short term• Mid term• Long term

04/20/23 6

Page 7: By: W Jorge Sitkewich, Mathematics and Statistics Adjunct Instructor San Jose City College. jsitke@ieee.orgjsitke@ieee.org Teaching Seasonal Forecasting

IV. Quarterly Data Electric Power USAIV. Quarterly Data Electric Power USAin Million Kilowatt hour per dayin Million Kilowatt hour per day

  Qtr Index   Dt= Total 10E6 KWhr per day Roll.Avg.Dt

2004

Q1 1 9,588.0  Q2 2 9,337.0  Q3 3 10,580.0 9,708.5Q4 4 9,260.0 9,735.9

2005

Q1 5 9,726.0 9,848.8Q2 6 9,418.0 9,989.0Q3 7 11,402.0 10,027.3Q4 8 9,560.0 10,055.8

2006

Q1 9 9,732.0 10,082.6Q2 10 9,640.0 10,066.8Q3 11 11,395.0 10,096.5Q4 12 9,440.0 10,160.4

2007

Q1 13 10,090.0 10,200.1Q2 14 9,793.0 10,266.0Q3 15 11,560.0 10,317.8Q4 16 9,802.0 10,324.5

2008

Q1 17 10,142.0 10,281.9Q2 18 9,795.0 10,203.1Q3 19 11,217.0  Q4 20 9,515.0  

Refer to Refer to Part B, Part B, Handout Handout #1#1

04/20/23 7

Page 8: By: W Jorge Sitkewich, Mathematics and Statistics Adjunct Instructor San Jose City College. jsitke@ieee.orgjsitke@ieee.org Teaching Seasonal Forecasting

IV. Four-Quarters Rolling Average, and IV. Four-Quarters Rolling Average, and the Seasonality Indexthe Seasonality Index

  Dt= Total 10E6 KWhr per day Roll.Avg.Dt Roll.Seas.    

IndexTypical.Seas. 

Index

9,588.0     0.98219,337.0     0.953610,580.0 9,708.5 1.0898 1.11909,260.0 9,735.9 0.9511 0.94519,726.0 9,848.8 0.9875 0.98219,418.0 9,989.0 0.9428 0.953611,402.0 10,027.3 1.1371 1.11909,560.0 10,055.8 0.9507 0.94519,732.0 10,082.6 0.9652 0.98219,640.0 10,066.8 0.9576 0.953611,395.0 10,096.5 1.1286 1.11909,440.0 10,160.4 0.9291 0.945110,090.0 10,200.1 0.9892 0.98219,793.0 10,266.0 0.9539 0.953611,560.0 10,317.8 1.1204 1.11909,802.0 10,324.5 0.9494 0.945110,142.0 10,281.9 0.9864 0.98219,795.0 10,203.1 0.9600 0.953611,217.0     1.11909,515.0     0.9451

Q1 Seas.Factor

Q2 Seas.Factor

Q3 Seas.Factor

Q4 Seas.Factor

0.9875 0.9428 1.0898 0.95110.9652 0.9576 1.1371 0.95070.9892 0.9539 1.1286 0.92910.9864 0.9600 1.1204 0.94940.9821 0.9536 1.1190 0.9451

Refer to Refer to Part C, Part C, Handout Handout #1#104/20/23 8

Page 9: By: W Jorge Sitkewich, Mathematics and Statistics Adjunct Instructor San Jose City College. jsitke@ieee.orgjsitke@ieee.org Teaching Seasonal Forecasting

IV. Data, De-Seasonalized Data, IV. Data, De-Seasonalized Data, and Trendand Trend

• De-Seasonalized data is used to create a linear trend that we extrapolate into the future.

• Ft = (linear trend)* (typical seasonal index)04/20/23 9

Refer to Refer to Part A, Part A, Handout Handout #2#2

Page 10: By: W Jorge Sitkewich, Mathematics and Statistics Adjunct Instructor San Jose City College. jsitke@ieee.orgjsitke@ieee.org Teaching Seasonal Forecasting

IV. De-IV. De-Seasonalized Seasonalized Data indicates Data indicates the Trend, while the Trend, while Seasonalized Seasonalized Data contains Data contains Forecasted Forecasted valuesvalues

Year Qtr Index #  Dt= Total 10E6 KWhr

per day

Deseasonalized Dt

LS.Roll Avg Dt

Ft=Seasonalized Dt

et=Dt-Ft error

residual

               2004 Q1 1 9,588.0 9,762.9 9,766.8 9,591.9 -3.9

Q2 2 9,337.0 9,791.4 9,796.7 9,342.1 -5.1Q3 3 10,580.0 9,455.1 9,826.6 10,995.7 -415.7Q4 4 9,260.0 9,798.1 9,856.6 9,315.2 -55.2

2005 Q1 5 9,726.0 9,903.4 9,886.5 9,709.4 16.6Q2 6 9,418.0 9,876.3 9,916.4 9,456.2 -38.2Q3 7 11,402.0 10,189.7 9,946.3 11,129.6 272.4Q4 8 9,560.0 10,115.6 9,976.2 9,428.3 131.7

2006 Q1 9 9,732.0 9,909.5 10,006.1 9,826.9 -94.9Q2 10 9,640.0 10,109.1 10,036.0 9,570.3 69.7Q3 11 11,395.0 10,183.5 10,066.0 11,263.5 131.5Q4 12 9,440.0 9,988.6 10,095.9 9,541.4 -101.4

2007 Q1 13 10,090.0 10,274.0 10,125.8 9,944.4 145.6Q2 14 9,793.0 10,269.6 10,155.7 9,684.4 108.6Q3 15 11,560.0 10,330.9 10,185.6 11,397.4 162.6Q4 16 9,802.0 10,371.6 10,215.5 9,654.5 147.5

2008 Q1 17 10,142.0 10,327.0 10,245.4 10,061.9 80.1Q2 18 9,795.0 10,271.7 10,275.4 9,798.5 -3.5Q3 19 11,217.0 10,024.4 10,305.3 11,531.3 -314.3Q4 20 9,515.0 10,067.9 10,335.2 9,767.6 -252.6

"Future"2009 Q1 21 10,365.1 10,179.5

Q2 22 10,395.0 9,912.6

Refer to Refer to Part B, Part B, Handout Handout #2#2 04/20/23 10

Page 11: By: W Jorge Sitkewich, Mathematics and Statistics Adjunct Instructor San Jose City College. jsitke@ieee.orgjsitke@ieee.org Teaching Seasonal Forecasting

IV. IV. Data Dt, and its Forecast Ft

• Forecasted values Ft, are used to estimate the probable forecast error

04/20/23 11

Refer to Refer to Part A, Part A, Handout Handout #3#3

Page 12: By: W Jorge Sitkewich, Mathematics and Statistics Adjunct Instructor San Jose City College. jsitke@ieee.orgjsitke@ieee.org Teaching Seasonal Forecasting

IV. IV. Error terms in Forecasting

• Error terms indicate a small forecast error.

• A cyclical component with a period of about four years is also noticed.

04/20/23 12

Refer to Refer to Part B, Part B, Handout Handout #3#3

Page 13: By: W Jorge Sitkewich, Mathematics and Statistics Adjunct Instructor San Jose City College. jsitke@ieee.orgjsitke@ieee.org Teaching Seasonal Forecasting

V. Discussion of Forecasting ErrorsV. Discussion of Forecasting Errors

• MAD or “mean absolute deviation”

• MAPE or “mean absolute percent deviation”

• Std deviation of forecasting error

• MSE or “mean squared error”

04/20/23 13

Page 14: By: W Jorge Sitkewich, Mathematics and Statistics Adjunct Instructor San Jose City College. jsitke@ieee.orgjsitke@ieee.org Teaching Seasonal Forecasting

V. Other Methods Typically UsedV. Other Methods Typically Used

• Single exponential smoothing, and double exponential smoothing.

• ARMA and ARIMA (Box-Jenkins methods).

Even though the more advanced methods may provide smaller forecasting error, they are harder to visualize and to perform with simple laptop tools.

04/20/23 14

Page 15: By: W Jorge Sitkewich, Mathematics and Statistics Adjunct Instructor San Jose City College. jsitke@ieee.orgjsitke@ieee.org Teaching Seasonal Forecasting

VI. References

EIA data set downloaded July 17, 2009: http://tonto.eia.doe.gov/cfapps/STEO_Query/steotables.cfm?tableNumber=8

Mason,R., Lind,D. Statistical Techniques in Business and Economics. R.D.Irwin 1993

X-12, ARIMA Reference manual, (July 17, 2009), http://www.census.gov/srd/www/x12a/x12down_pc.html

Ellis,Wade. Inquiry-base Software MicroWorlds: Promoting Understanding and Retention of Concepts. International Merlot Conference 2009

04/20/23 15

Refer to Refer to Part C, Part C, Handout Handout #3#3

Page 16: By: W Jorge Sitkewich, Mathematics and Statistics Adjunct Instructor San Jose City College. jsitke@ieee.orgjsitke@ieee.org Teaching Seasonal Forecasting

VI. Value of Problem Solving ProjectsVI. Value of Problem Solving Projects

Quote from Ellis Wade’s paper:

“…research indicates that students retain a concept only if the concept is learned to the level of problem-solving (level 4) or at least application of the concept (level 3 of the Bloom taxonomy). “

04/20/23 16

Page 17: By: W Jorge Sitkewich, Mathematics and Statistics Adjunct Instructor San Jose City College. jsitke@ieee.orgjsitke@ieee.org Teaching Seasonal Forecasting

VII. Conclusions and RecommendationsVII. Conclusions and Recommendations

• Students perform their assigned projects in Five Phases, each one is graded and feedback is given to each student.

• The final phase is the PowerPoint Summary given on the last day, and each group presents their PowerPoint Summary for 5 to 10 minutes each.

• Lessons-learned are discussed at the end of the final presentation by all students.

• The Instructor provides the pizza and refreshments.

04/20/23 17