10. Time Series Regression
1. Simple vs. Multiple Linear Regression (5 & 15-Mark Questions)
Regression calculates the "Line of Best Fit" through your data points using the Ordinary Least Squares (OLS) method.
-
Simple Linear Regression: Predicts a target variable (Y) using exactly one predictor variable (X). In time series, X is often simply "Time" (t).
- Formula: Y_t = \beta_0 + \beta_1 X_t + \epsilon_t
-
Multiple Linear Regression: Predicts a target variable using two or more predictor variables.
-
Formula: Y_t = \beta_0 + \beta_1 X_{1t} + \beta_2 X_{2t} + \dots + \epsilon_t
-
Example: Predicting daily ice cream sales (Y) using Temperature (X_1), Weekend Indicator (X_2), and Price (X_3).
-
2. Lagged Variables (5-Mark Question)
-
Definition: A lagged variable is a past value of a variable used as a predictor in a regression model. Instead of looking at X_t (today's value), you use X_{t-1} (yesterday's value) or X_{t-k}.
-
The Role in Forecasting: Real-world events take time to have an effect. This is called the "Delay Effect".
- Example: If a company runs a massive TV advertisement today (t), sales won't spike instantly. The sales spike might happen next week. Therefore, to predict next week's sales, you must use a Lagged Variable of Advertising Spend (X_{t-7}).
3. Coefficient of Determination (R^2)
-
Definition: R^2 is a statistical metric that measures the Goodness of Fit of a regression model. It represents the percentage of total variance in the target variable (Y) that is successfully explained by your predictor variables (X).
-
Interpretation: It ranges from 0 to 1 (or 0% to 100%).
-
An R^2 of 0.85 means: "85% of the fluctuations in our sales can be explained by our regression model. The remaining 15% is random noise or missing variables."
-
The higher the R^2, the tighter your data points hug the regression line.
-
4. Residual Analysis and Diagnostics (15-Mark Question)
Once your computer calculates the regression line, you are left with Residuals (the Errors).
To get full marks on the 15-mark model diagnostics question, you must state that a valid regression model must pass the Three Assumptions of Residuals:
-
Zero Mean: The residuals must hover evenly around the 0 line.
-
Homoscedasticity (Constant Variance): The spread of the errors must remain constant over time. If the errors start small and get wider and wider (like a megaphone shape), the model fails.
-
No Autocorrelation (Independence): This is the most critical rule in time series! Yesterday's error should not help you predict today's error. The residuals must be pure, random White Noise.
- How to test: We use the Durbin-Watson Test or plot the ACF chart of the residuals. If the ACF shows significant spikes, autocorrelation exists, and the model is invalid!