Differencing is a technique used to transform a non-stationary time series into a stationary one by computing the differences between consecutive observations.
ARIMA combines autoregression (AR), differencing (I), and moving average (MA) components to model and forecast time series data.
SARIMA extends ARIMA by adding seasonal components to handle periodic patterns in time series data.
Statistical test to determine if a time series has a unit root (is non-stationary) or is stationary.
Always perform stationarity testing before applying ARIMA models. Non-stationary data can lead to spurious regression results.
Last week we learned how to model and forecast single time series using ARIMA/SARIMA. This week, we extend our analysis to multiple interconnected time series and examine how they influence each other over time.
Correlation measures the strength and direction of a linear relationship between two variables. It ranges from -1 to +1.
As X increases, Y increases
No linear relationship
As X increases, Y decreases
High correlation does not imply causation. There might be other factors influencing both variables.
Observation: Areas with higher percentage of bald people tend to have higher real estate sales.
Scenario: A company notices high correlation between employee coffee consumption and productivity.
Wrong Action: Providing free coffee to all employees expecting productivity boost.
Reality: Productive employees work longer hours → drink more coffee. Coffee itself may not cause productivity.
Causation implies that one event (cause) directly produces or brings about another event (effect). It establishes a directional relationship where changes in the cause lead to changes in the effect.
X ↔ Y
Bidirectional association
X → Y
Unidirectional influence
Temperature → Ice Cream Sales
Height and Weight
Taller people tend to weigh more, and heavier people tend to be taller. The relationship works in both directions due to shared genetic and developmental factors.
Exercise and Fitness
Regular exercise causes improved fitness. While fitness might motivate more exercise, the primary causal direction is exercise → fitness improvement.
Counterfactual reasoning expresses what has not happened. Causal claims can be explained in terms of counterfactual conditionals of the form: "If A had not occurred, C would not have occurred"
"If kangaroos had no tails, they would not be upright."
This statement implies that kangaroo tails cause their upright posture. We test causation by imagining the absence of the proposed cause.
Click the link above to view the explanatory video
Research Question: Does a new teaching method improve student performance?
Scenario: Measuring impact of a marketing campaign
Granger's work bridged the gap between pure statistical correlation and meaningful economic causality, providing practical tools for economists and data scientists to identify directional relationships in time series data.
Variable X is said to "Granger-cause" variable Y if past values of X provide statistically significant information about future values of Y, beyond what is already contained in past values of Y alone.
If including lagged values of X improves the prediction of Y compared to using only lagged values of Y, then X Granger-causes Y.
Granger's work bridged the gap between pure statistical correlation and meaningful economic causality, providing practical tools for economists and data scientists to identify directional relationships in time series data.
Variable X is said to "Granger-cause" variable Y if past values of X provide statistically significant information about future values of Y, beyond what is already contained in past values of Y alone.
If including lagged values of X improves the prediction of Y compared to using only lagged values of Y, then X Granger-causes Y.
Granger causality provides actionable forecasting relationships, while simple correlation may not have predictive power for future periods.
A Vector Autoregressive (VAR) model is a multivariate time series model where each variable is modeled as a linear function of past values of itself and past values of all other variables in the system.
Yt = c + Φ₁Yt-1 + Φ₂Yt-2 + ... + ΦpYt-p + εt
Where:
GDPt = α₁ + β₁GDPt-1 + γ₁Inflationt-1 + ε₁t
Inflationt = α₂ + β₂GDPt-1 + γ₂Inflationt-1 + ε₂t
What does 'p' mean? The lag parameter 'p' tells us how many past time periods to include in our model.
Rule of thumb: Start with p = 1 to 4 for most economic data. Monthly data might need p = 12 for seasonality.
Variables: GDP Growth, Inflation Rate, Interest Rate
Key Advantage: Unlike ARIMA (which looks at one variable at a time), VAR considers how GDP growth today affects inflation tomorrow, which then affects interest rates the day after, which feeds back to affect GDP growth again!
BIC, also known as Schwarz Criterion (SC), is a model selection criterion that balances model fit with model complexity. It helps determine the optimal number of lags in VAR models.
BIC = -2ln(L) + k×ln(n)
Where:
Think of BIC as a "smart judge" that evaluates models on two criteria:
Rule: Choose the model with the lowest BIC value
BIC penalizes complexity more heavily than AIC, making it ideal for VAR models where the number of parameters grows quickly with additional lags.