Tutorials › Regression Analysis (Undergraduate) › Back-Transforming Confidence and Prediction Intervals

Transforming Predictors and Outcomes · Tutorial 406 of 991

Back-Transforming Confidence and Prediction Intervals

Learn to exponentiate log-scale interval endpoints correctly and interpret the resulting interval for a typical outcome or for a new observation.

Intermediate 9 min read

What You'll Learn

  • State the assumptions behind conventional log-scale confidence and prediction intervals.
  • Back-transform interval endpoints while retaining the outcome’s measurement units.
  • Interpret a confidence interval for the exponentiated conditional mean of the log outcome.
  • Distinguish uncertainty about a fitted conditional mean from variability in a new outcome.
  • Explain why back-transformed intervals are asymmetric on the outcome scale.
  • Avoid treating an exponentiated log-scale prediction as an arithmetic-mean prediction.

Why Back-Transforming an Interval Needs Care

A regression model for a logged outcome describes how the conditional mean of the log outcome changes with predictors. Its confidence and prediction intervals are therefore first calculated on the log scale. To express those intervals in the original units, we exponentiate both endpoints. This keeps the interval tied to the quantity that was actually estimated, but it does not make the interpretation automatic: a confidence interval for a conditional mean and a prediction interval for a new outcome concern different targets.

Exponentiation also changes the interval’s shape. A symmetric interval around a fitted log value usually becomes asymmetric around the exponentiated fitted value. The resulting limits are still valid for their intended targets under the model assumptions, but they should not be described as equal-sized “plus or minus” margins on the outcome scale.

The Log-Outcome Model and Its Targets

Let \(Y_i\) be a positive outcome for observation \(i\), and let \(u\) be one stated unit of measurement for that outcome. Define \(Z_i=\ln(Y_i/u)\), so the logarithm is taken of a dimensionless ratio. At predictor values represented by the vector \(\mathbf{x}_i\), consider the model

$$ Z_i=\mathbf{x}_i^\mathsf{T}\boldsymbol{\beta}+\varepsilon_i, \qquad \varepsilon_i\sim N(0,\sigma^2). $$

Here, \(\boldsymbol{\beta}\) is the vector of regression coefficients and \(\varepsilon_i\) is the error. For conventional \(t\)-based confidence and prediction intervals, assume the conditional mean of \(Z_i\) is correctly described by the stated regression form, the errors are independent with mean zero and common variance \(\sigma^2\), and the errors are normally distributed. The outcome must be positive so that its logarithm is defined. For a prediction interval, the future observation must also come from the same model under the same conditions, with an error independent of the data used to fit the regression.

At a particular predictor vector \(\mathbf{x}_0\), write \(\eta_0=E(Z\mid\mathbf{x}_0)\) for the conditional mean on the log scale. The value \(u\exp(\eta_0)\) is the exponentiated conditional mean of the log outcome. It is the conditional geometric mean; with normal, mean-zero log-scale errors, it is also the conditional median of \(Y\). It is not generally the conditional arithmetic mean of \(Y\).

Definition: A back-transformed interval is an interval obtained by exponentiating the lower and upper endpoints of an interval on the log scale and multiplying by \(u\), the outcome’s reference measurement unit. A confidence interval so formed concerns the exponentiated conditional mean of the log outcome. A prediction interval so formed concerns a new positive outcome.

Back-Transforming a Confidence Interval

Suppose a fitted regression estimates \(\eta_0\) by \(\hat{\eta}_0\), with standard error \(SE(\hat{\eta}_0)\). Let \(df\) be the residual degrees of freedom and \(t_{1-\alpha/2,df}\) the relevant \(t\) critical value for a two-sided interval with confidence level \(1-\alpha\). The usual confidence interval on the log scale is

$$ \hat{\eta}_0 \ \pm\ t_{1-\alpha/2,df}\,SE(\hat{\eta}_0). $$

Call its lower and upper endpoints \(L\) and \(U\). The corresponding interval on the outcome scale is

$$ \bigl[u\exp(L),\ u\exp(U)\bigr]. $$

This is a confidence interval for \(u\exp(\eta_0)\), not for an arbitrary individual outcome. If the model assumptions hold and the same procedure is repeated across samples, approximately \(100(1-\alpha)\%\) of intervals will cover that fixed target. The interval does not assign a probability to the target being inside the particular interval observed.

Worked Example: A Confidence Interval for a Typical Outcome

Suppose a hypothetical regression models a positive biomarker concentration \(Y\) in mg/L. At a specified predictor value, the fitted conditional mean of \(Z=\ln(Y/(1\text{ mg/L}))\) is \(\hat{\eta}_0=2.00\), with \(SE(\hat{\eta}_0)=0.12\) and \(df=24\). The two-sided 95% critical value is \(t_{0.975,24}=2.064\). Assume observations are independent, the log-scale mean form is appropriate, and residual checks give no strong evidence against constant variance or approximate normality.

First calculate the 95% interval on the log scale:

$$ 2.00\pm 2.064(0.12) =2.00\pm0.24768 =[1.75232,\ 2.24768]. $$

Exponentiate the endpoints and express the result in mg/L:

$$ [\,\exp(1.75232),\ \exp(2.24768)\,]\text{ mg/L} \approx[5.768,\ 9.466]\text{ mg/L}. $$

The interval estimates the conditional geometric mean concentration at those predictor values; under the stated normal-error model, it also estimates the conditional median. It does not say that 95% of individual concentrations fall between 5.768 and 9.466 mg/L. Nor does it automatically estimate the conditional arithmetic mean.

Back-Transforming a Prediction Interval

A prediction interval answers a different question: how uncertain is the outcome for one new observation at \(\mathbf{x}_0\)? It must account for both uncertainty in the fitted conditional mean and the residual variation of an individual outcome around that mean. In ordinary least squares, if the model has \(q\) fitted coefficients, define the leverage at \(\mathbf{x}_0\) as \(h_0=\mathbf{x}_0^\mathsf{T}(X^\mathsf{T}X)^{-1}\mathbf{x}_0\), where \(X\) is the design matrix. Write \(MSE\) for the residual mean square. The standard error for predicting a new log outcome is

$$ \sqrt{MSE(1+h_0)}. $$

The \(1\) in this expression represents the new observation’s residual variance; \(h_0\) represents uncertainty in estimating the conditional mean. The corresponding prediction interval on the log scale is

$$ \hat{\eta}_0 \ \pm\ t_{1-\alpha/2,df}\sqrt{MSE(1+h_0)}. $$

As with the confidence interval, exponentiate the lower and upper endpoints and multiply by \(u\). Under the model assumptions, the resulting interval has the stated prediction coverage for a new \(Y\) at the specified predictor values. It is usually wider than the confidence interval for the exponentiated conditional mean because it includes individual-outcome variability as well as estimation uncertainty.

Worked Example: Predicting One New Concentration

Continue with the hypothetical biomarker model above. Suppose \(MSE=0.0900\) on the log scale at the relevant predictor values, and the leverage is \(h_0=0.0400\). Thus the estimated residual standard deviation is \(0.300\). The predictor settings and independent sampling conditions are assumed to match the fitted model; the log-scale residual checks described in the previous example are also relevant here.

The standard error for predicting one new log concentration is

$$ \sqrt{MSE(1+h_0)} =\sqrt{0.0900(1.0400)} =\sqrt{0.09360} \approx0.3059. $$

Using \(t_{0.975,24}=2.064\), the 95% log-scale prediction interval is

$$ 2.00\pm2.064(0.3059) \approx2.00\pm0.6314 =[1.3686,\ 2.6314]. $$

Back-transforming gives

$$ [\,\exp(1.3686),\ \exp(2.6314)\,]\text{ mg/L} \approx[3.930,\ 13.89]\text{ mg/L}. $$

This is a prediction interval for one new concentration at the specified predictor values, not a confidence interval for the conditional geometric mean. It is wider than the confidence interval in the previous example because it includes the residual variation of the new concentration.

Why the Back-Transformed Limits Are Asymmetric

A log-scale interval is symmetric around \(\hat{\eta}_0\), but the exponential function is curved: equal additive changes in a logarithm correspond to multiplicative changes in the original value. If the log-scale endpoints are \(\hat{\eta}_0-m\) and \(\hat{\eta}_0+m\), their exponentials are

$$ \exp(\hat{\eta}_0-m) =\exp(\hat{\eta}_0)\exp(-m), \qquad \exp(\hat{\eta}_0+m) =\exp(\hat{\eta}_0)\exp(m). $$

The two endpoint ratios relative to \(\exp(\hat{\eta}_0)\) are reciprocals, but the additive distances from that fitted value are generally unequal. The interval is symmetric in multiplicative terms, not additive terms. Exponentiation also preserves ordering, which is why the lower endpoint remains lower than the upper endpoint.

Worked Example: Reading the Asymmetry on the Outcome Scale

Suppose a hypothetical log-outcome regression estimates \(\hat{\eta}_0=1.20\), with standard error \(0.0800\), \(df=30\), and \(t_{0.975,30}=2.042\). Assume positive outcomes, independent observations, a suitable linear mean on the log scale, and residual checks supporting constant variance and approximate normality.

The margin of error on the log scale is

$$ 2.042(0.0800)=0.16336, \qquad [L,U]=[1.03664,\ 1.36336]. $$

The fitted value on the outcome scale and the back-transformed limits are

$$ \exp(1.20)\approx3.320, \qquad [\exp(1.03664),\ \exp(1.36336)] \approx[2.820,\ 3.909]. $$

The lower additive distance from the fitted value is \(3.320-2.820=0.500\), while the upper distance is \(3.909-3.320=0.589\). These are not equal. In ratio terms, however, the lower and upper limits are approximately \(2.820/3.320=0.8494\) and \(3.909/3.320=1.177\), reflecting the reciprocal factors \(\exp(-0.16336)\) and \(\exp(0.16336)\), up to rounding. The interval remains a 95% confidence interval for the exponentiated conditional mean of the log outcome, under the stated assumptions.

A Short Justification for Preserved Coverage

The mathematical reason endpoint back-transformation works is that \(\exp(z)\) is strictly increasing. If the unknown log-scale target \(\eta_0\) falls between \(L\) and \(U\), then exponentiating preserves both inequalities:

$$ L\leq\eta_0\leq U \quad\Longleftrightarrow\quad \exp(L)\leq\exp(\eta_0)\leq\exp(U). $$

Multiplying all three quantities by the positive unit \(u\) preserves the inequalities as well. Therefore the event that a confidence interval covers \(\eta_0\) is exactly the event that its back-transformed interval covers \(u\exp(\eta_0)\). Its repeated-sampling coverage is unchanged. The same order-preserving argument applies to a prediction interval for a new log outcome: whenever its log value lies between the log-scale endpoints, the new positive outcome lies between the exponentiated endpoints.

Common Mistakes and Practical Interpretation

  • Confusing a confidence interval with a prediction interval. A confidence interval concerns the exponentiated conditional mean of the log outcome; a prediction interval concerns one new outcome. The latter includes residual variation and is generally wider.
  • Calling the exponentiated fitted log mean the arithmetic mean. It is the conditional geometric mean and, under normal log-scale errors, the conditional median. The arithmetic mean is a different target and requires accounting for the error distribution.
  • Reporting a symmetric margin on the outcome scale. Symmetry applies before exponentiation. On the original scale, describe the lower and upper limits directly, with units.
  • Exponentiating only the fitted value. To transform an interval, exponentiate both endpoints. Transforming only the center gives a point estimate, not interval limits.
  • Forgetting the measurement unit. If the model uses \(Z=\ln(Y/u)\), multiply the exponentiated limits by \(u\) so the reported interval is in the units of \(Y\).
Key takeaway: First identify the target and form its interval on the log scale. Then exponentiate both endpoints and restore the outcome unit. State whether the result concerns the exponentiated conditional mean of the log outcome or a new individual outcome.

Check Your Understanding

Use the target and scale of each interval to guide your answers.

  1. A log-scale confidence interval is \([0.4,0.8]\), and \(u=1\) mg/L. Write the back-transformed interval in mg/L.
  2. In a log-outcome regression, what does a confidence interval for \(u\exp(\eta_0)\) describe? Under normal log-scale errors, what additional interpretation does this quantity have?
  3. Why is a prediction interval for one new outcome generally wider than a confidence interval for the exponentiated conditional mean?
  4. A symmetric log-scale interval has endpoints \(\hat{\eta}_0-m\) and \(\hat{\eta}_0+m\). Explain why the back-transformed interval is not generally symmetric in additive outcome units.
  5. Why should an exponentiated fitted log mean not automatically be reported as the conditional arithmetic mean?