For this, we need to check how correlated the time series is with lagged versions of itself.
The original time series will be denoted as 0. A 1-timestep lagged version will be referred to as 1. And so on...
The correlation of the original time series with the lag 0 (no lagged), will always be equal to 1, since they are the same time series.
The questions are...
โข What is the correlation of the original time series with lag 1?
โข What about lag 2?
โข And 3, 4, 5...?
A timestep โtโ will have some correlation with the previous one (t-1) just by being adjacent to it.
For example, with the #Bitcoin price, the price today will be influenced by the price it had yesterday. Also, the price yesterday will be affected by the price the day before.
There are two effects that we need to account for:
1๏ธโฃ The indirect effect that the timestep t-1, t-2, t-3โฆ have over timestep t, just by being adjacent to one another. This is what we have just explained with the #BTC price.
2๏ธโฃ The direct effect that each of the previous timesteps has over timestep t.
If for instance, every three days (for the #BTC example) there is a special event, it is expected that we will see a direct correlation of the time series with a lag 3 series.
To measure these two effects we can use the ACF and PACF graphs:
ยท ACF (AutoCorrelation Function) shows the correlation between timesteps. It includes both direct and indirect effects.
ยท PACF (Partial AutoCorrelation Function) shows only the direct correlation.
We use the so-called "lollipop" graphs to visualise it.
There are several spikes or "lollipops" on it. They indicate the correlation of each lag (on the x-axis) with the original non-lagged time series.
We will pay attention to the largest spike closer to the lag 0 which is significantly different from 0 (out of the blue-shaded area).
But for today is enough. Tomorrow we will see how we select "p" and "q" for this example.
Time Series analysis and forecasting is a really valuable skill to have in #DataScience.
Here is WHY๐งต๐
:one: All companies are interested in making money. Time series is really powerful in #finance! ๐๐
There will always be demand for someone who can analyse and forecast financial data. Plus it can bring you a lot of money if you can increase the profit of a company! ๐ฐ๐ฐ๐ฐ
:two: There are multiple applications for Time Series: forecasting sales, unemployment rate, COVID cases, petrol price, temperatures...
There is a demand for Data Scientists with this skill everywhere! You are not restricted to a particular field ๐ญ๐๐งฌ๐ก or location ๐ช๐บ๐บ๐ธ๐ฎ๐ณ!