Forecasting
Introduction to Forecasting Methods
The session is focused on methods for forecasting, specifically introductory techniques that are simple yet effective for various applications.
It is highlighted that these methods work well in situations with limited data points or unclear trends in the data.
These methods will serve as benchmark techniques against complex machine learning forecasting methods, which may also utilize these fundamental approaches.
Agenda Overview
Time Series Exploration:
Understanding your data before building a model or making forecasts, similar to regression analysis.
Key components of time series data include:
Level
Trend
Seasonality
Noise (which should not be predicted)
Key Focus Areas:
Identifying trends in time series data.
Understanding seasonality in time series.
Forecasting Methods:
Introduction to naive forecasting, moving averages, and exponential smoothing.
Reference to textbook sections 8.3 for additional insights.
Time Series Components
Components of time series:
Level: The base value around which the time series fluctuates.
Trend: The long-term movement in the data, can be upwards or downwards.
Seasonality: Regular fluctuations that occur at specific intervals (e.g., monthly).
Noise: Random variations that do not follow a discernible pattern.
Understanding the Components
Noise in time series cannot be predicted, and forecasting methods should focus on identifying and predicting the underlying level, trend, or seasonality.
Example observed: Straight line level forecasts can be more accurate than forecasts that try to incorporate noise without clear patterns.
Identifying Trends and Seasonality
Visual Analysis:
Analyzing time series visually can help determine the presence of trends and seasonality.
Example Products:
UK Gross Domestic Product: Acknowledge the upward trend.
US Exports of Leather: No clear trend; possible level time series.
Ice Cream Sales: Seasonal peaks expected over summer months.
Durable Consumer Goods: Notable trends and seasonality.
Airline Passenger Data: Observed trends and seasonal effects.
Automated Trend Detection:
Businesses often need to analyze numerous time series simultaneously, making manual visual assessments impractical.
Centered Moving Average (CMA): A method used to smooth out time series data, reducing noise to reveal underlying trends.
Calculation involves averaging a series of observations and placing this average at the center of the respective time frame.
Example Calculation:
Average for periods 1, 2, and 3:
Given values: 86, 109, 117
Calculation:
The average (104) is placed in the second position of the timeframe.
Moving Averages
Standard Moving Average:
The simple moving average captures a specific number of past observations.
Length decision depends on the data's periodicity:
Example: Monthly data -> SMA of 12 (for yearly seasonality).
Quarterly data -> SMA of 4; Daily data -> SMA of 7; Weekly data -> SMA of 52.
Moving Averages in Excel:
Excel includes functions to calculate moving averages automatically.
Manual calculation often requires balancing ends when considering average lengths that are even.
Forecasting Methods Overview
Naive Forecasting:
Definition: The simplest forecasting technique where tomorrow's value is predicted as equal to today's value.
Limitations: Sensitive to outliers; forecast can lag behind actual trends.
Example Scenario: Forecasting SKU stock in Supply Chain Management.
May perform unexpectedly well for sudden level changes, though it cannot filter out noise.
Average Forecast:
Definition: Uses all historical data to give a collective average for predictions.
Benefits: Robust to noise and outliers but slow to react to trend changes.
Comparison of Techniques
Naive vs. Average Forecast:
Naive Forecast:
Memory: One observation only.
Cannot filter noise.
Average Forecast:
Memory: Long-term based on all observations.
Less reactive to recent trends.
Moving Average Forecast:
Takes a few recent observations into account and defines a balance between naive and average methods.
Definition: If calculating a moving average for February, the average of the previous three months is used.
Seasonal Effects in Data
Seasonal effects can be visualized by plotting seasonal data over multiple years to identify patterns.
Important to decompose trends before analyzing seasonality to avoid misinterpretation due to overshadowing trends.
Exponential Smoothing
Exponential Smoothing Formula:
( \hat{y}{t+1} = \alpha yt + (1 - \alpha) \hat{y}_t )
Where:
(y_t): Actual value today
(\hat{y}_t): Forecasted value for today
(\alpha): Smoothing constant between [0,1].
Alpha Parameter Control:
Lower (\alpha) emphasizes historical data (closer to average).
Higher (\alpha) reacts more to recent observations (closer to naive forecasting).
Final Remarks
Explore different values of (\alpha) to optimize forecast performance based on the data patterns.
Training and practice with formulas and methods are highly recommended for exams and practical applications.