Working with Seasonal Time Series

Matters get incrementally more complicated when you have a time series that’s characterized in part by seasonality: the tendency of its level to rise and fall in accordance with the passing of the seasons. We use the term season in a more general sense than its everyday meaning of the year’s four seasons. In the context of predictive analytics, a season can be a day if patterns repeat weekly, or a year in terms of presidential election cycles, or just about anything in between. An eight-hour shift in a hospital can represent a season.

This chapter takes a look at how to decompose a time series so that you can see how its seasonality operates apart from its trend (if any). As you might expect from the material in Chapters 3 and 4, several approaches are available to you.

 

Simple Seasonal Averages

The use of simple seasonal averages to model a time series can sometimes provide you with a fairly crude model for the data. But the approach pays attention to the seasons in the data set, and it can easily be much more accurate as a forecasting technique than simple exponential smoothing when the seasonality is pronounced.

The data and chart shown in Figure 5.1 represent the average number of daily hits to a website that caters to fans of the National Football League. Each observation in column D represents the average number of hits per day in each of four quarters across a five-year time span.

 

Identifying a Seasonal Pattern

You can tell from the averages in the range G2:G5 that a distinct quarterly effect is taking place. The largest average number of hits occurs during fall and winter, when the main 16 games and the playoffs are scheduled. Interest, as measured by average daily hits, declines during the spring and summer months.