The Granger causality test is a a hypothesis test to determine if one time series is useful in forecasting another.

While it is fairly easy to measure correlations between series - when one goes up the other goes up, and vice versa - it’s another thing to observe changes in one series correlated to changes in another after a consistent amount of time.

This may indicate the presence of causality, that changes in the first series influenced the behavior of the second. However, it may also be that both series are affected by some third factor, just at different rates. Still, it can be useful if changes in one series can predict upcoming changes in another, whether there is causality or not. In this case we say that one series “Granger-causes” another.

In the case of two series, and , the null hypothesis is that lagged values of do not explain variations in .

In other words, it assumes that doesn’t Granger-cause .

The stattools grangercausalitytests function offers four tests for granger non-causality of 2 timeseries