I read that there is a bias when we transform a series with a logarithm and then applying the inverse function, but only in forecasts of the mean values.
I don't understand what it means exactly.
In the book "Introductory Time Series with R", there is a section about this very issue:
The bias in the means arises as a result of applying the inverse transform to a residual series. For example, if the time series are Gaussian white noise $w_{t}$, with mean zero and standard deviation σ, then the distribution of the inverse-transform (the anti-log) of the series is log-normal with mean $e^{σ ^{2}/2}$. This can be verified theoretically, or empirically by simulation as in the code below:
set.seed(1)
sigma <- 1
w <- rnorm(1e+06, sd = sigma)
mean(w)
[1] 4.69e-05
> mean(exp(w))
[1] 1.65
> exp(sigma^2/2)
[1] 1.65
The code above indicates that the mean of the anti-log of the Gaussian white noise and the expected mean from a log-normal distribution are equal. Hence, for a Gaussian white noise residual series, a correction factor of $e^{σ^{2}/2}$ should be applied to the forecasts of means.
In the same section, it says that an adjusted forecast {$x'_{t}$} with an empirical correction factor is:
$$\hat{x}'_{t} = e^{\hat{\log x_{t}}}\sum_{t=1}^{n}\frac{e^z_{t}}{n}$$
where $\hat{\log x_{t}}$ is the predicted series given by the log-regression model.
Does anyone know what this means? As far as I understand, when we apply a logarithm to a series and fit a (linear) model to the resulting values, we are doing the following:
$$\log x_{t} = \alpha t + \beta + z_{t}$$
where $z_{t}$ are the residues. So, I would think that the reverse transformation is given by:
$$x_{t} = e^{\alpha t + \beta} e^{z_{t}}$$
However, what is the forecasting of means and how is it involved in this procedure? I'm guessing it's $\displaystyle \frac{e^z_{t}}{n}$ but I can't see a justification.
UPDATE:
Suppose we use the model described above to predict some values $p_{t}$. Since we used a logarithmic transformation, to revert it, we have to do this for all new $t$:
$$\exp{p_{ŧ}}$$
However, the book says that in order to apply the correction to each new predicted value, we need to do this:
$$p_{\text{t}}^{\text{corrected}} = p_{t} \frac {1}{n}\sum_{t=1}^{n} e^{\hat z_t}$$
Why? I thought that the mean of the forecast is biased but not its individual values.
R
code either). $\endgroup$