R Tutorial : White noise

White noise is a random time series with no patterns, serving as the baseline for forecasting. The ACF plot shows whether a series has exploitable structure: spikes outside the blue bounds indicate autocorrelation. The Ljung-Box test confirms this statistically, and pig-slaughter data from Victoria demonstrates how a seemingly random plot can hide significant patterns.
Chapters
Let me show you the most boring time series you will ever see. It's just random, independent and identically distributed observations. In shorthand, statisticians often call this IID data. In other words, there's nothing going on. No trend, no seasonality, no cyclicity, not even any autocorrelations, just randomness. In time series, it is called white noise. The name comes from physics, where white light has some similar mathematical characteristics. Although it appears boring, it is a very important type of time series because it is the basis of almost all forecasting models. The autocorrelation function of white noise consists of many insignificant spikes. Because the data is simply random, we expect correlations between observations to be close to zero. The dashed blue lines are there to show us how large a spike has to be before we can consider it significantly different from zero. In this example, the first 15 spikes are all within the blue lines. As you would expect, even the largest spike at lag 10 is well within the range you would expect for a white noise series. The blue lines are based on the sampling distribution for autocorrelation. Assuming the data are white noise, any spike within the blue line should be ignored. Spikes outside the blue lines might indicate something interesting in the data. At least they suggest there may be some information that you could use in building a forecasting model. Here is a time series showing the number of pigs slaughtered each month in my home state of Victoria. At first glance, it looks relatively random. Possibly there's a slight upward trend. But it's hard to see the difference between this and a white noise series on the basis of a time plot. But when you look at the ACF plot of the same data, you can see there is actually some information in the data. The first three spikes are significantly larger than zero, so you can be confident that this is not a white noise series. In other words, there is some information in the data that can be used in building a forecasting model. Looking at an ACF is useful, but sometimes it is easy to test all the autocorrelations together rather than consider each one separately. To do this, you can use a lung box test. It considers the first H autocorrelation values to see if they, as a group, look like what you would expect from a white noise series. You can apply it to the first 24 autocorrelations you saw in the ACF plot for the pigs data set. Here, the P value is very small, again suggesting that this is not a white noise series. To summarize, white noise is a purely random time series. Often you will use a long box test to see if you have a white noise series. If you don't have white noise, you can then look at the ACF to see which spikes are the most significant. Now it's your turn to try these ideas on another time series.
More from Richie

#359 My Best Friend is AI with Valerie Tiberius, Professor of Philosophy at University of Minnesota

How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon

#358 How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon







