# How to create forecast data prediction interval bands

I have seasonal data from which I create forecasts. The steps I perform are: deseasonalizing the data, finding the linear regression for the deseasonalized points, predicting a few points from the linear regression and adding seasonality to the predicted values to get forecast data. My input is quite sinusoidal so all works well.

The problem is that the more in the future you predict, the more prediction errors increase. I'd like to show that on a chart, but I am not sure how to calculate these errors. I was thinking something like prediction interval bands for forecast data (whatever they are called). These bands would increase the further you predict in the future.

Here are some images that show what I'm trying to do: sample bands image1 sample bands image2

My question is what is the name for these bands? (then I can do a google search for it) I'd also appreciate the formulas needed for the band calculations. I'm guessing there is a standard deviation in there somewhere.

I've looked at confidence interval, but that seems to be for the data already present, not for the forecast data.

• Are you sure that your time series is deterministic in time? I.e., $Y_t=at+\epsilon_t$ after deseasonalizing, or have you considered a random walk with fixed drift: $Y_{t+1}=Y_t+\delta+\epsilon_t$? Where $\delta$ is a fixed "drift".The differnece is that the second form has much more variance and will not fall on a neat line, but it will increase over time. Just something to consider, as that info will help us recommend prediction bands.
– user31668
Nov 4, 2013 at 19:25
• @Eupraxis1981 The data is from google analytics so I am guessing it is deterministic in time. BTW my stats background is minimal. Nov 4, 2013 at 21:27
• Thanks for clarifying. I was asking about the specific data you are modeling. Is there a reason to believe that the linear trend model is appropriate. I.e., would you expect "regression towards the mean" at time $t>t_0$ if you saw a large/small value at $t_0$? Or, would you expect the trend to continue from the last observed point?
– user31668
Nov 4, 2013 at 21:42
• @Eupraxis1981 yes the linear trend is fine. Nov 5, 2013 at 16:30