« Worthy of the Times | Main | Reading »



What is convenient is you actually had the "beer sales".

Wouldn't you be slightly frustrated if budweiser refused a FOIA to get at those "beer sales?"

Just sayin'

Jorge Camoes

Tufte discusses briefly time-series decomposition in The Visual Display...

While most people can easily understand the need to separate trends from seasonal fluctuations they don't have the necessary statistical skills to use advanced time-series decomposition in their analysis. In this case the ratio-to-moving-average approach may be a good starting point.


Time series decomposition is vital in all official statistics - the X11 procedure and all its descendants were actually developed at the US census bureau.
Bill Cleveland et al's STL procedure is available in R and everybody can use it quite easily to do such a decomposition as shown in the beer sales example.
Nonetheless, decompositional methods seem to be treated as an orphan by most primarily mathematically trained statisticians.

It is definitely true that teaching students about all the Box & Jenkins ARMA stuff should come AFTER an introduction to decomposition methods like STL.


"But when is it shameful to extend the plot of a time series so as to display the long-term trend"

Honestly, have you actually seen the chart Phil Jones is referring to in that email?

The "hide the decline" trick had nothing to do with extending a time series to show a long-term trend.

The trick involved cutting one time series short by a couple decades (tree ring data) and grafting on a second time series (recent instrument data).

The problem was not extending the chart, or even using two different data sets. The problem was switching data sets mid-chart, without noting the switch.

Other versions of the chart show the distinction clearly by drawing the two data sets with two different lines.


Woeful: if it's not clear already, I am not taking sides in the actual debate concerning the particular chart as I have not reviewed the issue, and I also believe that one could not take sides based on a casual look at one chart given the complexity of this issue. In this post, I am reacting to the way they snickered as they discussed chart design. There are legitimate statistical reasons for determining scale, data fusion ("grafting"), etc. I am not saying their particular actions were legitimate; I am just saying the email shows no recognition of these statistical issues.


Martin: indeed, the beer sales example I found used the STL function in R.

Ran Barton

Dumb question - is there a primer you might suggest for someone wishing to learn how to perform a decomposition? I have spent some time trying to learn how to do this on my own, but if there was a cookbook out there I could review, I'd love to hear your suggestions. My work environment really wants us to stick to Excel, so R and other tools are not things I have ready access to, alas.

Frank Chillamos

I find it odd that beer sales increase with the same rate as global temperature increase. Perhaps beer consumption is causing global temperature increase! *fart*


Ran: maybe try this reference for the STL procedure in R. Remember R is open source freeware, and hopefully your work place will let you install that.

R.B. Cleveland, W.S. Cleveland, J.E. McRae, and I. Terpenning (1990) STL: A Seasonal-Trend Decomposition Procedure Based on Loess. Journal of Official Statistics, 6, 3–73.


Thank you for the reference; I will track that down.


Here it is: link.

Thank you again.

Tom Hopper

I was not familiar with STL; it's fantastic. Thanks for highlighting it!

I could have used this several years ago, but I wonder: will STL work on time series where the periodic (seasonal) component has an irregular and essentially random length? e.g. the dimension of a part checked 100% where the number of parts is highly variable over time.

The comments to this entry are closed.

Kaiser Fung. Business analytics and data visualization expert. Author and Speaker.
Visit my website. Follow my Twitter. See my articles at Daily Beast, 538, HBR.

See my Youtube and Flickr.

Book Blog

Link to junkcharts

Graphics design by Amanda Lee

The Read

Keep in Touch

follow me on Twitter