# The forecast mean after back-transformation

February 24, 2014
By

(This article was first published on Hyndsight » R, and kindly contributed to R-bloggers)

Many functions in the forecast package for R will allow a Box-Cox transformation. The models are fitted to the transformed data and the forecasts and prediction intervals are back-transformed. This preserves the coverage of the prediction intervals, and the back-transformed point forecast can be considered the median of the forecast densities (assuming the forecast densities on the transformed scale are symmetric). For many purposes, this is acceptable, but occasionally the mean forecast is required. For example, with hierarchical forecasting the forecasts need to be aggregated, and medians do not aggregate but means do.

It is easy enough to derive the mean forecast using a Taylor series expansion. Suppose represents the back-transformation function, is the mean on the transformed scale and is the variance on the transformed scale. Then using the first three terms of a Taylor expansion around , the mean on the original scale is given by

### Box-Cox transformations

For a Box-Cox transformation,

So

and the backtransformed mean is given by

Therefore, to adjust the back-transformed mean obtained by R, the following code can be used.