Lecture 5 - Forecasting Techniques

1. Introduction to forecasting techniques

This section introduces the fundamental concepts and categorization of forecasting techniques employed in business decision-making to mitigate uncertainty.

1.1 Purpose of forecasting

The primary purpose of forecasting in business is to reduce uncertainty and enhance the accuracy of predictions regarding future events, thereby enabling better-informed decision-making.

1.2 Categories of forecasting approaches

Forecasting techniques can be broadly classified into three main categories:

  • Qualitative and judgmental techniques: These methods rely on expert opinion, intuition, and subjective judgment. They are particularly useful when historical data is scarce or when forecasting for novel situations or the distant future.
  • Statistical time-series models: These models forecast future values based solely on historical data of the variable being predicted. They assume that past patterns will continue into the future.
  • Explanatory/causal models: These techniques attempt to identify and quantify relationships between the variable being forecast and other independent variables (causal factors) that are believed to influence it.

1.3 Qualitative and judgmental forecasting

Qualitative and judgmental forecasting methods are employed when quantitative historical data is unavailable or insufficient.

  • Historical analogy approach: This method forecasts a variable by drawing comparisons with similar prior situations or events.
  • Delphi method: This technique involves systematically soliciting and aggregating judgments from a panel of anonymous experts. The process typically involves multiple rounds of questionnaires, with feedback provided to experts between rounds to encourage convergence of opinion.

1.4 Statistical time-series models

Statistical time-series models utilize historical data of a single variable to predict its future values. A time series is a sequence of data points measured over time.

1.4.1 Components of a time series

Time series data can often be decomposed into four potential components:

  • Trend (T): The long-term upward or downward movement in the data.
  • Seasonal (S): Patterns that repeat over a fixed period, such as daily, weekly, or yearly.
  • Cyclical (C): Fluctuations that occur over longer periods than seasonal variations, often related to business cycles.
  • Random (R): Unpredictable variations or noise in the data that cannot be attributed to trend, seasonality, or cyclicality.

1.4.2 Forecasting models for stationary time series (Random Variations)

For time series exhibiting primarily random variations (i.e., stationary series), several basic forecasting models can be used:

  • Naïve forecast: The forecast for the next period is simply the actual value of the variable in the current period. Ft+1=YtF_{t+1} = Y_t where Ft+1F_{t+1} is the forecast for period t+1t+1, and YtY_t is the actual value in period tt.
  • n-period moving average: This method calculates the average of the most recent nn actual data values to forecast the next period. It helps to smooth out random fluctuations. Ft+1=∑i=0n−1Yt−inF_{t+1} = \frac{\sum_{i=0}^{n-1} Y_{t-i}}{n} where Ft+1F_{t+1} is the forecast for period t+1t+1, Yt−iY_{t-i} are the actual values for the previous nn periods, and nn is the number of periods to average.
  • Exponential smoothing: This technique forecasts the next period's value as a weighted average of the last period's forecast and the last period's actual value. It assigns exponentially decreasing weights to older observations. Ft+1=Ft+α(At−Ft)F_{t+1} = F_t + \alpha (A_t - F_t) where Ft+1F_{t+1} is the forecast for period t+1t+1, FtF_t is the forecast for period tt, AtA_t is the actual observed value in period tt, and α\alpha is the smoothing constant (0≤α≤10 \le \alpha \le 1).

    Note: The initial forecast F1F_1 and F2F_2 are typically set equal to the first actual observation, A1A_1.

1.4.2.1 Weighted moving average

A weighted moving average assigns different weights to the data points within the averaging period, typically giving more weight to more recent observations. This is useful when there is an emerging trend or pattern. Ft+1=∑i=1nwiYt−i+1F_{t+1} = \sum_{i=1}^{n} w_i Y_{t-i+1} where wiw_i is the weight for the ii-th period, ∑i=1nwi=1\sum_{i=1}^{n} w_i = 1, and Yt−i+1Y_{t-i+1} is the actual value in the (t−i+1)(t-i+1)-th period.

1.4.2.2 Error metrics and forecast accuracy

The quality of a forecast is assessed by its accuracy. Common error metrics include:

  • Mean Absolute Deviation (MAD)
  • Mean Square Error (MSE)
  • Root Mean Square Error (RMSE)
  • Mean Absolute Percentage Error (MAPE)

These metrics help compare different forecasting models and select the one that minimizes forecast errors.

Tip: When comparing forecasting models, the model that yields the lowest values for these error metrics is generally preferred.

1.5 Forecasting time series with seasonality

When time series exhibit seasonal patterns, specialized techniques are required for accurate forecasting.

  • Multiple regression models with categorical variables: Dummy variables can be used to represent seasonal periods.
  • Holt-Winters models: These models extend exponential smoothing to incorporate both trend and seasonality.
  • Decomposition method: This approach involves isolating the trend and seasonal components of a time series to develop more accurate forecasts.

1.5.1 Decomposition method

The decomposition method breaks down a time series into its constituent components (trend, seasonal, cyclical, and random) to understand their individual behavior and forecast them separately. The typical steps are:

  1. Compute seasonal indices: Determine indices that represent how each season compares to an average season. This can be done using centered moving averages (CMAs) or overall averages.
    • An index of 1.0 indicates an average season.
    • An index greater than 1.0 indicates a season that is above average.
    • An index less than 1.0 indicates a season that is below average.
  2. Deseasonalize the data: Divide each actual data point by its corresponding seasonal index. This removes the seasonal effect, leaving the trend-cycle and random components. Yt,deseasonalized=Yt/SItY_{t, \text{deseasonalized}} = Y_t / SI_t where YtY_t is the actual value at time tt, and SItSI_t is the seasonal index for period tt.
  3. Find the equation of a trend line: Use a statistical method, such as linear regression, to fit a trend line to the deseasonalized data, with time as the independent variable.
  4. Forecast for future periods using the trend line: Project the trend line into the future to obtain a trend forecast.
  5. Reseasonalize the forecast: Multiply the trend forecast by the appropriate seasonal index for the future period to obtain the final forecast. Yt,forecast=Yt,trend×SItY_{t, \text{forecast}} = Y_{t, \text{trend}} \times SI_t

1.5.1.1 Centered moving average (CMA) approach for seasonal indices

When dealing with time series that have both trend and seasonality, the CMA approach is preferred for calculating seasonal indices.

  • Compute the CMA: For each observation, calculate a moving average centered on that observation. For quarterly data, this involves averaging pairs of observations that straddle the target period.
  • Compute the seasonal ratio: Divide each actual observation by its corresponding CMA.
  • Average seasonal ratios: Average the seasonal ratios for each season (e.g., all Q1 ratios) to obtain the seasonal index for that season.
  • Adjust seasonal indices: If the sum of the seasonal indices does not equal the number of seasons (e.g., for quarterly data, it should sum to 4), adjust each index proportionally.

Example: For quarterly data, if the sum of the four seasonal indices is 3.95, multiply each index by (4/3.95)(4/3.95) to ensure they sum to 4.

1.6 Regression-based forecasting with causal variables

Explanatory/causal models, often referred to as econometric models, use regression analysis to identify and quantify relationships between a dependent variable (the one being forecast) and one or more independent variables (causal factors). These independent variables can include time (for trend) and other relevant factors such as economic indicators, demographic data, or prices.

  • Simple linear regression: Can be used to forecast a time series with a linear trend, where time is the independent variable.
  • Multiple linear regression: Allows for the incorporation of multiple independent variables, including both time (for trend) and other causal variables, to predict the dependent variable.

Important: When incorporating causal variables, the model can often provide more accurate forecasts by accounting for external influences on the variable being predicted. Using metrics like MAD or MSE can help determine which regression model (e.g., simple linear trend vs. multiple regression with causal variables) provides the best forecast accuracy.

1.7 The practice of forecasting

The choice of forecasting technique often depends on the time horizon and the nature of the variable being forecast:

  • Judgmental and qualitative methods: Frequently used for forecasting sales of new product lines, strategic planning, and broad company or industry-wide forecasts.
  • Simple time-series models: Typically employed for short- to medium-range forecasts, especially when historical data is reliable.
  • Regression methods: Often preferred for long-term forecasts due to their ability to incorporate causal factors that may evolve over time.

2. Time-series statistical forecasting models

Statistical time-series forecasting models predict future values based solely on historical data of a single variable, extrapolating past patterns to forecast future outcomes.

2.1 Components of a time series

A time series, which is a sequence of historical data points over time (e.g., weekly sales), can exhibit several components that influence its behavior:

  • Trend (T): A long-term upward or downward movement in the data.
  • Seasonal (S): Patterns that repeat over a fixed period (e.g., daily, weekly, monthly, or yearly).
  • Cyclical (C): Ups and downs in the data that occur over much longer and irregular periods than seasonality, often related to economic cycles.
  • Random (R): Unpredictable fluctuations in the data that cannot be explained by trend, seasonality, or cyclical components.

2.2 Forecasting models for stationary time series

Stationary time series are those where the statistical properties, such as mean and variance, do not change over time. For such series, basic forecasting models can be applied, primarily focusing on the random component.

2.2.1 Naïve model

The simplest forecasting method, the naïve model, assumes that the forecast for the next period will be equal to the actual value of the current period.

Forecastt+1=Actualt\text{Forecast}_{t+1} = \text{Actual}_t

Example: If 10 units were sold yesterday, the naïve model forecasts 10 units for today.

2.2.2 Moving average model

The moving average model forecasts the next period's value as the average of the most recent nn actual data values. This method helps to smooth out short-term fluctuations.

Forecastt+1=∑i=0n−1Actualt−in\text{Forecast}_{t+1} = \frac{\sum_{i=0}^{n-1} \text{Actual}_{t-i}}{n}

Where:

  • Forecastt+1\text{Forecast}_{t+1} is the forecast for the next time period.
  • Actualt\text{Actual}_t is the actual value in the current time period.
  • nn is the number of periods to average.

Example: A 3-period moving average for week 18 would use the actual sales data from weeks 15, 16, and 17.

2.2.3 Weighted moving average model

Weighted moving averages assign different weights to past observations, giving more importance to more recent data. This is particularly useful when a trend or pattern is emerging.

Forecastt+1=∑i=0n−1wi×Actualt−i\text{Forecast}_{t+1} = \sum_{i=0}^{n-1} w_i \times \text{Actual}_{t-i}

Where:

  • wiw_i are the weights assigned to each period, and ∑i=0n−1wi=1\sum_{i=0}^{n-1} w_i = 1.

Example: A 3-month weighted moving average might use weights of 0.5 for the last month, 0.3 for two months ago, and 0.2 for three months ago. The formula would be 0.5×Saleslast month+0.3×Salestwo months ago+0.2×Salesthree months ago0.5 \times \text{Sales}_{\text{last month}} + 0.3 \times \text{Sales}_{\text{two months ago}} + 0.2 \times \text{Sales}_{\text{three months ago}}.

2.2.4 Exponential smoothing model

Exponential smoothing is a technique where the forecast for the next period is a weighted average of the current period's forecast and the current period's actual value. It adjusts the forecast based on the error in the previous period.

Forecastt+1=Forecastt+α×(Actualt−Forecastt)\text{Forecast}_{t+1} = \text{Forecast}_t + \alpha \times (\text{Actual}_t - \text{Forecast}_t)

This can also be expressed as:

Forecastt+1=α×Actualt+(1−α)×Forecastt\text{Forecast}_{t+1} = \alpha \times \text{Actual}_t + (1 - \alpha) \times \text{Forecast}_t

Where:

  • α\alpha is the smoothing constant, a value between 0 and 1. A higher α\alpha gives more weight to recent actual values.
  • For the initial forecast (t=1t=1), F1F_1 is often set equal to A1A_1.

Note: The "Damping factor" in Excel's Exponential Smoothing tool is equal to (1−α)(1 - \alpha).

Important: Selecting the optimal smoothing constant α\alpha is crucial. This is often done by developing trial forecasts with different α\alpha values and choosing the one that minimizes error metrics like MAD.

2.3 Error metrics and forecast accuracy

Evaluating the quality of a forecast is essential. Several metrics are used to quantify the error between forecasted and actual values:

  • Mean Absolute Deviation (MAD): The average of the absolute differences between actual and forecasted values. MAD=∑t=1T∣At−Ft∣T\text{MAD} = \frac{\sum_{t=1}^{T} |A_t - F_t|}{T}
  • Mean Square Error (MSE): The average of the squared differences between actual and forecasted values. It penalizes larger errors more heavily. MSE=∑t=1T(At−Ft)2T\text{MSE} = \frac{\sum_{t=1}^{T} (A_t - F_t)^2}{T}
  • Root Mean Square Error (RMSE): The square root of the MSE. It is in the same units as the data. RMSE=MSE\text{RMSE} = \sqrt{\text{MSE}}
  • Mean Absolute Percentage Error (MAPE): The average of the absolute percentage errors. It is useful for comparing forecast accuracy across different time series. MAPE=1T∑t=1T∣At−FtAt∣×100%\text{MAPE} = \frac{1}{T} \sum_{t=1}^{T} \left| \frac{A_t - F_t}{A_t} \right| \times 100\%

Tip: When comparing different forecasting models, the model with the lowest values for these error metrics is generally preferred.

2.4 Regression-based forecasting for time series with a linear trend

When a time series exhibits a clear linear trend, simple linear regression can be used to forecast future values. In this context, time itself is treated as the independent variable.

The linear regression model takes the form:

Yt=β0+β1Xt+ϵtY_t = \beta_0 + \beta_1 X_t + \epsilon_t

Where:

  • YtY_t is the value of the time series at time tt.
  • XtX_t is the time period (e.g., 1,2,3,…1, 2, 3, \ldots).
  • β0\beta_0 is the intercept.
  • β1\beta_1 is the slope, representing the average change in YtY_t per unit increase in time.
  • ϵt\epsilon_t is the random error term.

Note: While linear regression can capture trends, it may not adequately predict turning points or significant deviations from the trend, as seen when production drops after a peak.

2.5 Forecasting time series with seasonality

When time series display seasonal patterns, specialized techniques are required to accurately capture these repeating fluctuations.

2.5.1 Decomposition method

The decomposition method aims to isolate and analyze the trend, seasonal, cyclical, and random components of a time series to develop more accurate forecasts. The general steps are:

  1. Compute seasonal indices: Determine how each season compares to an average season. This can be done using methods like Centered Moving Averages (CMAs).

    • A seasonal index of 1 indicates an average season.
    • An index greater than 1 indicates a season higher than average.
    • An index less than 1 indicates a season lower than average.
  2. Deseasonalize the data: Remove the seasonal effect by dividing each actual observation by its corresponding seasonal index. Deseasonalized Datat=ActualtSeasonal Indext\text{Deseasonalized Data}_t = \frac{\text{Actual}_t}{\text{Seasonal Index}_t}

  3. Find the trend line: Use regression analysis on the deseasonalized data to establish a trend equation.

  4. Forecast using the trend line: Project future values using the trend equation for the desired future periods.

  5. Reseasonalize the forecast: Multiply the trend line forecast by the appropriate seasonal index to obtain the final seasonal forecast. Reseasonalized Forecastt=Trend Forecastt×Seasonal Indext\text{Reseasonalized Forecast}_t = \text{Trend Forecast}_t \times \text{Seasonal Index}_t

2.5.1.1 Centered Moving Average (CMA) approach for seasonal indices

The CMA approach is commonly used to calculate seasonal indices, especially when a trend is present. The process involves:

  • Compute the CMA: For each observation, calculate a moving average centered around that point. For quarterly data, this might involve averaging periods that are 1.5 quarters before and 1.5 quarters after the current quarter.
  • Compute seasonal ratios: Divide each actual observation by its corresponding CMA. Seasonal Ratio=ObservationCMA\text{Seasonal Ratio} = \frac{\text{Observation}}{\text{CMA}}
  • Average seasonal ratios: Average the seasonal ratios for each corresponding season (e.g., average all Q1 seasonal ratios) to obtain the seasonal indices.
  • Adjust seasonal indices (if necessary): If the sum of the seasonal indices does not equal the number of seasons (e.g., does not sum to 4 for quarterly data), adjust each index by multiplying it by the ratio: (Number of Seasons)/(Sum of Indices)(\text{Number of Seasons}) / (\text{Sum of Indices}).

Note: The CMA helps to prevent the trend component from being mistaken for seasonal variation.

2.5.2 Regression with trend and seasonal variables

Multiple regression can also be used to forecast time series with both trend and seasonality. In this model:

  • Time is included as a quantitative independent variable to capture the trend.
  • Dummy variables are used to represent the seasonal components. If there are kk seasons, k−1k-1 dummy variables are typically used, with one season serving as the reference category.

For example, with quarterly data, you might have:

  • X1X_1: Time period.
  • X2X_2: Dummy variable for Quarter 2 (1 if Q2, 0 otherwise).
  • X3X_3: Dummy variable for Quarter 3 (1 if Q3, 0 otherwise).
  • X4X_4: Dummy variable for Quarter 4 (1 if Q4, 0 otherwise). (Quarter 1 would be the reference category, where X2,X3,X4X_2, X_3, X_4 are all 0).

The regression equation would then be: Yt=β0+β1Xt,1+β2Xt,2+β3Xt,3+β4Xt,4+ϵtY_t = \beta_0 + \beta_1 X_{t,1} + \beta_2 X_{t,2} + \beta_3 X_{t,3} + \beta_4 X_{t,4} + \epsilon_t

Tip: Comparing forecasts from decomposition methods and regression models using error metrics like MAD or MSE can help determine the most appropriate model.

2.6 Regression forecasting with causal variables

Beyond time as an independent variable, regression analysis can incorporate other factors (causal variables) that are believed to influence the time series being forecast. These are often referred to as explanatory or causal models.

  • Simple Linear Regression with Causal Variable: Predicts the time series using a single causal variable (e.g., forecasting sales based on advertising expenditure).
  • Multiple Linear Regression with Causal Variables: Predicts the time series using multiple independent variables, which can include time, economic indicators, demographic factors, prices, etc.

Yt=β0+β1Xt,1+β2Xt,2+…+βkXt,k+ϵtY_t = \beta_0 + \beta_1 X_{t,1} + \beta_2 X_{t,2} + \ldots + \beta_k X_{t,k} + \epsilon_t

Where:

  • YtY_t is the dependent variable (the time series to be forecast).
  • Xt,iX_{t,i} are the independent causal variables at time tt.
  • βi\beta_i are the regression coefficients.

Example: To forecast gasoline sales, a model could include time (for trend) and the average price per gallon (a causal variable) to predict sales volume more accurately. The multiple regression model would then estimate coefficients for both time and price.

Remember: The choice of forecasting technique often depends on the time horizon. Qualitative methods are used for long-term, uncertain futures. Simple time-series models are suitable for short- to medium-term forecasts. Regression methods are often applied for longer-term forecasts, especially when causal relationships are well-understood.

3. Forecasting time series with seasonality and trend

This section delves into methods for forecasting time series data that exhibit both a systematic upward or downward movement (trend) and repeating patterns over fixed periods (seasonality).

3.1 Components of a time series

A time series can often be decomposed into several components:

  • Trend (T): The long-term upward or downward movement in the data.
  • Seasonal (S): Patterns that repeat over a fixed period, such as daily, weekly, monthly, or quarterly.
  • Cyclical (C): Fluctuations that occur over longer, irregular periods (e.g., business cycles), often spanning several years.
  • Random (R): Unpredictable variations in the data that cannot be explained by the other components.

3.2 Forecasting stationary time series

For time series that are stationary (i.e., have no trend or seasonality, primarily exhibiting random variations), several basic forecasting models can be employed:

  • Naïve Method: Assumes the next period's value will be the same as the current period's actual value. Mathematically, Ft+1=YtF_{t+1} = Y_t, where Ft+1F_{t+1} is the forecast for the next period and YtY_t is the actual value in the current period.
  • n-period Moving Average: Forecasts are based on the average of the most recent nn data points. This method smooths out short-term irregularities. The formula is: Ft+1=Yt+Yt−1+⋯+Yt−n+1nF_{t+1} = \frac{Y_t + Y_{t-1} + \dots + Y_{t-n+1}}{n}
  • Weighted Moving Average: Similar to the moving average, but assigns different weights to past observations, often giving more importance to recent data. The formula is: Ft+1=w1Yt+w2Yt−1+⋯+wnYt−n+1F_{t+1} = w_1 Y_t + w_2 Y_{t-1} + \dots + w_n Y_{t-n+1} where ∑i=1nwi=1\sum_{i=1}^{n} w_i = 1.
  • Exponential Smoothing: A more sophisticated method that uses a smoothing constant (α\alpha) to adjust the previous forecast based on the error between the previous forecast and the actual value. The new forecast is calculated as: Ft+1=Ft+α(At−Ft)F_{t+1} = F_t + \alpha (A_t - F_t) where Ft+1F_{t+1} is the forecast for period t+1t+1, FtF_t is the forecast for period tt, AtA_t is the actual value in period tt, and α\alpha is the smoothing constant (0≤α≤10 \le \alpha \le 1). For the initial forecast, F1F_1 and F2F_2 are often set equal to the first actual observation A1A_1. The choice of α\alpha impacts the responsiveness of the forecast to recent changes. Lower α\alpha values result in smoother forecasts, while higher α\alpha values make the forecast more reactive.

Note: Error metrics like Mean Absolute Deviation (MAD), Mean Square Error (MSE), Root Mean Square Error (RMSE), and Mean Absolute Percentage Error (MAPE) are crucial for evaluating the accuracy of these forecasting models and selecting the best parameters (e.g., the optimal α\alpha for exponential smoothing or the number of periods nn for moving averages).

3.3 Regression-based forecasting for linear trends

When a time series exhibits a clear linear trend, simple linear regression can be applied with time (tt) as the independent variable. The model takes the form: Yt=β0+β1t+ϵtY_t = \beta_0 + \beta_1 t + \epsilon_t where YtY_t is the value of the time series at time tt, β0\beta_0 is the intercept, β1\beta_1 is the slope representing the trend, and ϵt\epsilon_t is the error term. This method allows for forecasting future values by extrapolating the established trend line.

Important: While regression can capture linear trends, it may not adequately predict sudden shifts or downturns in production after a certain period, as observed in coal production data.

3.4 Forecasting time series with seasonality

When seasonality is present, more advanced techniques are required:

3.4.1 Decomposition method

The decomposition method breaks down a time series into its constituent components (trend, seasonal, and random). The process typically involves the following steps:

  1. Compute Seasonal Indices: Calculate indices that represent the typical behavior of each season relative to an average season. This can be done by:

    • Calculating the overall average for each season if there's no trend.
    • Using the centered moving average (CMA) approach, which is more robust when a trend is present. This involves computing a moving average centered on each observation, then calculating the ratio of the observation to its CMA, and finally averaging these ratios for each season to obtain the seasonal index (SISI). SIt=YtCMAtSI_t = \frac{Y_t}{CMA_t}
    • If the sum of seasonal indices does not equal the number of seasons (e.g., four for quarterly data), they are normalized by multiplying each index by (Number of seasons) / (Sum of indices).
  2. Deseasonalize the Data: Remove the seasonal effect by dividing each observation by its corresponding seasonal index. Deseasonalized datat=YtSItDeseasonalized\ data_t = \frac{Y_t}{SI_t}

  3. Find the Trend Line: Fit a trend line (typically linear regression) to the deseasonalized data, using time (tt) as the independent variable. Deseasonalized Yt=β0+β1tDeseasonalized\ Y_t = \beta_0 + \beta_1 t

  4. Forecast Using the Trend Line: Project the trend line into the future to obtain a deseasonalized forecast for the desired future period. Forecasted Deseasonalized Yt+k=β0+β1(t+k)Forecasted\ Deseasonalized\ Y_{t+k} = \beta_0 + \beta_1 (t+k)

  5. Reseasonalize the Forecast: Multiply the deseasonalized forecast by the appropriate seasonal index to obtain the final forecast. Reseasonalized Forecastt+k=Forecasted Deseasonalized Yt+k×SIt+kReseasonalized\ Forecast_{t+k} = Forecasted\ Deseasonalized\ Y_{t+k} \times SI_{t+k}

Tip: The centered moving average approach is essential for calculating seasonal indices when a trend is present, as it prevents the trend from being misinterpreted as seasonal variation.

3.4.2 Regression with trend and seasonal dummy variables

This method uses multiple regression to forecast both the trend and seasonal components simultaneously.

  • Time (tt) is included as a continuous independent variable to capture the trend.
  • Dummy variables are created for each season (except one, which serves as the reference category). For example, in quarterly data, dummy variables can be defined for quarters 2, 3, and 4, with quarter 1 being the reference.
    • X1=tX_1 = t (time period)
    • X2=1X_2 = 1 if quarter 2, 00 otherwise
    • X3=1X_3 = 1 if quarter 3, 00 otherwise
    • X4=1X_4 = 1 if quarter 4, 00 otherwise

The regression equation would be: Yt=β0+β1X1+β2X2+β3X3+β4X4+ϵtY_t = \beta_0 + \beta_1 X_1 + \beta_2 X_2 + \beta_3 X_3 + \beta_4 X_4 + \epsilon_t This approach provides an additive decomposition model where the forecast is a sum of the trend component and the seasonal adjustments. The resulting forecasts can differ from those generated by multiplicative decomposition methods. Model performance can be compared using error metrics like MAD or MSE.

3.5 Regression forecasting with causal variables

Beyond time and seasonality, other external factors, known as causal variables (e.g., economic indicators, demographic data), can significantly influence a time series. Explanatory or causal models, often employing multiple regression analysis, aim to identify and quantify these relationships.

For instance, forecasting gasoline sales might involve not only time and seasonal factors but also causal variables like the average price per gallon. A multiple regression model incorporating these factors would take the form: Salest=β0+β1Timet+β2Pricet+ϵtSales_t = \beta_0 + \beta_1 Time_t + \beta_2 Price_t + \epsilon_t This approach allows for more comprehensive forecasting by accounting for external drivers of the time series.

Remember: The choice of forecasting method depends on the characteristics of the data and the forecasting horizon. Qualitative methods are useful for new products or long-term strategic planning. Simple time-series models are suitable for short-to-medium term operational forecasts. Regression models, especially those including causal variables, are often preferred for longer-term strategic forecasts where underlying drivers can be identified.

4. Regression-based forecasting with causal variables

This section explores how regression analysis can be leveraged to incorporate external causal factors, beyond temporal trends, into forecasting models to enhance prediction accuracy for variables such as sales, moving beyond simple time-series extrapolations.

4.1 Introduction to regression-based forecasting with causal variables

Regression-based forecasting, also known as explanatory or causal modeling, aims to identify and quantify the relationships between a dependent variable (the variable to be forecast) and one or more independent variables that are believed to influence it. These independent variables are called causal variables because they are thought to have a direct impact on the forecast variable. This approach is particularly useful when external factors, such as economic indicators, demographic shifts, or price changes, are known to affect the variable of interest, and when historical data alone might not capture these dynamics.

Important: While time-series models extrapolate past patterns of a variable, causal models seek to explain the variable's behavior based on the influence of other factors.

4.2 The role of causal variables in regression

Causal variables are external factors that can influence the variable being forecast. By incorporating these variables into a regression model, forecasters can build more robust and accurate predictions than those relying solely on historical data of the forecast variable itself. This allows for the understanding of "what-if" scenarios where changes in causal variables can be simulated to forecast their impact on the outcome.

  • Example: If forecasting gasoline sales, the price per gallon of gasoline is a crucial causal variable. Changes in this price directly affect consumer purchasing decisions and, consequently, sales volume.

4.3 Developing regression models with causal variables

Regression analysis is the primary statistical tool for building causal forecasting models. The process involves:

  1. Identifying potential causal variables: This requires domain knowledge and analytical insight to determine which external factors are likely to influence the forecast variable.
  2. Gathering data: Collect historical data for both the dependent variable and the identified causal independent variables.
  3. Specifying the regression model: This typically starts with a linear relationship.
    • Simple Linear Regression: Used when only one causal variable is considered. The model is expressed as: Y=β0+β1X+ϵY = \beta_0 + \beta_1 X + \epsilon Where:
      • YY is the dependent variable (forecast variable).
      • XX is the independent variable (causal variable).
      • β0\beta_0 is the intercept.
      • β1\beta_1 is the coefficient for the independent variable, representing the change in YY for a one-unit change in XX.
      • ϵ\epsilon is the error term, representing unexplained variation.
    • Multiple Linear Regression: Used when two or more causal variables are included. The model is expressed as: Y=β0+β1X1+β2X2+⋯+βkXk+ϵY = \beta_0 + \beta_1 X_1 + \beta_2 X_2 + \dots + \beta_k X_k + \epsilon Where:
      • X1,X2,…,XkX_1, X_2, \dots, X_k are the independent causal variables.
      • β1,β2,…,βk\beta_1, \beta_2, \dots, \beta_k are the coefficients for each independent variable, indicating their individual impact on YY, holding other variables constant.

Note: For regression-based forecasting, time can also be included as an independent variable alongside causal variables, creating models that account for both trend and external influences.

4.4 Example: Forecasting gasoline sales with time and price

Consider forecasting weekly gasoline sales (YY). Potential causal factors include time (X1X_1, representing trend) and the average price per gallon (X2X_2). A multiple linear regression model could be formulated as:

Gasoline Sales=β0+β1(Time)+β2(Average Price per Gallon)+ϵ\text{Gasoline Sales} = \beta_0 + \beta_1 (\text{Time}) + \beta_2 (\text{Average Price per Gallon}) + \epsilon

Using historical data, a regression analysis might yield an equation like:

Y^=72,333+508.7X1−16,463X2\hat{Y} = 72,333 + 508.7 X_1 - 16,463 X_2

To forecast sales for week 11, assuming the average price per gallon is 3.80 dollars:

Y^week 11=72,333+508.7(11)−16,463(3.80)\hat{Y}_{\text{week 11}} = 72,333 + 508.7(11) - 16,463(3.80) Y^week 11=72,333+5,595.7−62,559.4\hat{Y}_{\text{week 11}} = 72,333 + 5,595.7 - 62,559.4 Y^week 11=15,369.3\hat{Y}_{\text{week 11}} = 15,369.3

This predicts approximately 15,369 gallons for week 11.

Example: If a regression model predicts gasoline sales based on time and average price per gallon, and the coefficient for average price is negative (β2<0\beta_2 < 0), it indicates that as the price of gasoline increases, sales volume tends to decrease, which aligns with economic principles.

4.5 Model selection and evaluation

When using regression with causal variables, it's essential to evaluate the model's performance and compare different model specifications.

  • Error Metrics: Standard error metrics like Mean Absolute Deviation (MAD), Mean Squared Error (MSE), Root Mean Squared Error (RMSE), and Mean Absolute Percentage Error (MAPE) are used to assess forecast accuracy.
  • Comparing Models: If multiple causal variables are considered, or if different functional forms (e.g., linear vs. non-linear) are explored, these error metrics help in selecting the model that provides the best predictive performance.
  • Statistical Significance: Coefficients of independent variables should be statistically significant to confirm their meaningful impact on the forecast variable.

Tip: When comparing a simple trend-based regression with a multiple regression model that includes causal variables, the model with the causal variables will often demonstrate superior accuracy if those variables have a genuine explanatory power.

4.6 Applications and considerations

Regression-based forecasting with causal variables is versatile and can be applied across various business scenarios, particularly for medium to long-term predictions where external factors are expected to drive future outcomes.

  • Applications:
    • Sales forecasting influenced by marketing expenditures, competitor pricing, or economic conditions.
    • Demand forecasting for products affected by demographic changes or promotional activities.
    • Financial forecasting influenced by interest rates, inflation, or market indices.
  • Considerations:
    • Data Availability and Quality: Reliable historical data for all variables is crucial.
    • Causality vs. Correlation: It is vital to establish true causality rather than just correlation between variables.
    • Model Complexity: Overly complex models with too many independent variables can lead to overfitting, where the model fits the historical data very well but performs poorly on new, unseen data.
    • Assumptions of Regression: Linear regression models rely on certain assumptions (e.g., linearity, independence of errors, homoscedasticity) that should be checked.

Remember: Regression-based forecasting with causal variables is a powerful tool for understanding and predicting phenomena driven by external factors, offering deeper insights than time-series methods alone.

Common mistakes to avoid

  • Review all topics thoroughly before exams
  • Pay attention to formulas and key definitions
  • Practice with examples provided in each section
  • Don't memorize without understanding the underlying concepts

© 2026 Maeve. All rights reserved. This content is protected by copyright.

See also