310 likes | 533 Views
Forecasting - 2. Lecture 7 Dr. Haider Shah. Learning outcomes. Continue understanding the primary tools for forecasting Understand time series analysis and when and how to apply it. Sales forecasting. Complex and difficult Need to consider various factors. Sales forecasting factors.
E N D
Forecasting - 2 Lecture 7 Dr. Haider Shah
Learning outcomes • Continue understanding the primary tools for forecasting • Understand time series analysis and when and how to apply it
Sales forecasting • Complex and difficult • Need to consider various factors
Sales forecasting with regression • Sales of product A over the past 7 years were as follows: Yr Sales (‘000 units) 1 22 2 25 3 24 4 26 5 29 6 28 7 30 Noting that X becomes the years, identify the sales in Year 8 using regression analysis
Time Series • A time series is a collection of observations of well-defined data items obtained through repeated measurements over time. • e.g. retail sales each month of the year • Data collected irregularly or only once are not time series.
Time series • Records a series of figures or values over time. Values e.g. sales (£) Time
Time series A graph version is called a histogram
Forecast Error Measures Mean Absolute Deviation (MAD) Mean Square Error (MSE) Mean Absolute Percentage Error (MAPE)
Forecastimg Methods • Data Type : Choice of method • If static data: Naive or Average method • If trended data – Holts’s method; Regression • If seasonal data – Decomposition • You must PLOT your data and then decide….
Analysis of Time Series • A time series can be decomposed into four components: • Trend (long term direction), • Seasonal variations (time related movements) • Cyclical variations • Randomvariations (unsystematic, short term fluctuations).
The trend • The underlying long-term movement over time in values of data recorded • There are three types of trend: • Downward trend • Upward trend • Static trend
Seasonal variations • Short-term fluctuations in recorded values, due to different circumstances which affect results at different times of a period.
Example: Seasonal variations Customers (‘000s) TREND Year 1 Year 3 Year 2
Variations • Cyclical – • medium-term changes in results caused by circumstances which repeat in cycles • Random • non-recurring caused by unforeseen circumstances e.g. a war, stock market crash
Summarising the components • Y = T + S + C + R Where Y = the actual time series T = the trend series S = the seasonal component C = the cyclical component R = the random component
Additive model Expresses a time series as Y = T + S + R Multiplicative model Y = T x S x R
The trend? How is the trend? Promising? What if it’s a Christmas card company? Post December slump in sales?
Decomposition Process • Use moving averages to eliminate the seasonal effect • Odd numbered (mid point is easy) • If it is even numbered (4, 12) we must use centred moving averages • Use this series to extrapolate the trend into the future • Difference between trend and actual data = seasonality • Average this for similar seasonal periods (like for like quarters) • Project these averages (seasonal factors) into the future • Add the projected trend and seasonal factors together Adequacy of forecasts can be measured with MSE etc
Finding the trend • Can be hard to distinguish between a trend and seasonal fluctuations. • One way of doing this is using ‘moving averages’ which attempts to remove seasonal and cyclical variations • The average of the results of a fixed number of periods
Moving Averages: example Year Sales units 1 390 2 380 3 460 4 450 5 470 6 440 7 500 Required: What is the moving average using a period of 3 years
Moving Averages (MA3): Solution 1230 410 430 1290 460 1380 1360 453 470 1410
Moving Averages- for even number of periods Find the moving average over a period of 4 qtrs Yr Qtr Actual sales (units) 2008 1 1,350 2 1,210 3 1,080 4 1,250 2009 1 1,400 2 1,260 3 1,110 4 1,320
Finding the seasonal variations • Additive model was Y = T + S + R • Can be Y – T = S + R • If we assume random variations as negligible: • S = Y –T • So if we deduct trend from actual data we get seasonal variations
Example: trend + seasonal Find the trend and seasonal variations of the following sales data: Year Quarter Actual(£k) 2008 1 600 2 840 3 420 4 720 2009 1 640 2 860 3 420 4 740 Moving average = 4 quarters
Work for Tutorial How decomposition of Time Series can be used for forecasting future estimates