timeline - seasonality detection (II)
This block is an experimentation of how to detect if a timeline has a seasonality component, and how to detect the lenght of the season (if any).
Seasonality means that the time serie has a periodic component, repeating the same pattern on each period. For example, sales of a store may have a week-based seasonality: sales increase on saturday, while there is no sale at all on sunday.
Graphically speaking, detecting a seasonality is (quite) easy: just look for a repeating pattern. Note that it could be difficult if the pattern has a long period, or/and the order of magnitude of the seasonilaty is low (ie. lowest and highest values are not so far from the season's mean, but in this case there might be no seasonality at all ! ).
Computationnaly speaking, one can use the correlogram. This diagram represents all the coefficients of autocorrelation of the time serie (go to this block for detailed explanations of what is a coefficient of autocorrelation, and how to compute it). With the help of this diagram, one can identify season's lenght, if any.
Usages :
- in the left graph, Drag & Drop points to update the timeline and create seasons of your choice (below the graph are some shortcuts)
- decrease the order of magnitude of the seasonality component to see that when this order is small, then it becomes difficult to detect a season: coefficient of correlation for each lag are constantly high (see below comment for details);
- similarily with the previous comment, increase the trend of the timeline to see that the higher is the trend, the more difficult it is to detect a season; each coefficient of correlation is high because their corresponding lagged time serie and the original time serie behave the same way (they have the same trend), and the seasonality component becomes less important;
- go to this block in order to understand that detrending the time serie before computing the correlogram is a must have because it nullifies the previous comment, allowing to detect very small seasonnality order of magnitude;
Notes:
- another block experiments detrending before computing the correlogram
- another block experiments autocorrelation
- another block experiments time series correlation
- another block deals with the impact of seasonality when computing the trend of a timeline
Acknowledgments: