Analyzing seasonality

Now, we can analyze seasonality—that is, how data changes across months. From our observations, we know that, for some months, sales tend to be higher, whereas for other months, sales tend to be lower. We evaluate the differences between the linear trend and actual sales. Based on the pattern observed in these differences, we produce a model of seasonality to predict sales more accurately for each month:

Sales for January
Year 2010 2011 2012 2013 2014 2015 2016 2017 Average
Actual sales 10.5 11.9 13.2 14.6 15.1 16.5 18.9 20
Sales on the trend line 13.012 14.291 15.57 16.849 18.128 19.407 20.686 21.965
Difference -2.512 -2.391 -2.37 -2.249 -3.028 -2.907 -1.786 -1.965 -2.401
Sales for ...

Get Data Science Algorithms in a Week - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.