Artificial Intelligence 🤖
Time Series Analysis

Time Series Analysis

Tend to be discrete samples taken over discrete points in time, over a period of time, or time series.

Trends

https://upload.wikimedia.org/wikipedia/commons/5/5e/Trends_in_global_average_absolute_sea_level%2C_1870-2008_%28US_EPA%29.png

Here are global average sea levels over time between 1870 and 2008. So, you can see here that there is definitely an overall trend going upwards over time from 1870 to 2010 i.e. sea level is increasing. There are fluctuations from year to year but the larger trend, going back over a larger period of time, is pretty clear.

Seasonality

File:Bigpi43(2009).png

Time series can also exhibit seasonality. For example, if we look at the incidence of pneumonia and influenza, we can see that definitely has seasonal components to it and it tends to peak during certain months.

Seasonality can be superimposed on trends to compose a time series. In this case, the trend looks pretty flat.

Seasonality & Trends

https://upload.wikimedia.org/wikipedia/commons/thumb/c/c2/Active_Editors_trend_enwiki.svg/1280px-Active_Editors_trend_enwiki.svg.png

You can take a raw data set of a time series, as seen on the top here, extract its seasonal component - so you can actually numerically figure out what is the seasonal piece of that - and if you subtract out the seasonality from the raw data, you're left with the trends.

Now the data we're looking at here is actually Wikipedia edits, so the raw data is at the top, we extract the seasonal trends and if you subtract out that seasonality, we get the overall trend that takes out those month to month variations.

Noise

  • Some variations are just random in nature, can't be accounted for otherwise

  • One way of modelling this is an additive model:

    • Seasonality + Trends + Noise = time series

    • Additive model

    • Assume seasonal variation is constant

  • Or sometimes Multiplicative model:

    • seasonality * trends * noise

    • trends sometimes amplify seasonality and noise.

    • Multiplicative model

    • Seasonal variation increases (scales) as the trend increases

      • so as the scale of your data increases or decreases, the amplitude of that seasonality also increases or decreases.