Prediction interval for a ratio of log-normal responses (source code)

= Prediction interval for a ratio of log-normal responses

Suppose independent future log responses satisfy $Z_j=x_j^T\beta+\varepsilon_j$, where the errors have variance $\sigma^2$. Conditional on a fitted <normal linear model>, the predicted log ratio $Z_1-Z_2$ has estimated mean $(x_1-x_2)^T\widehat\beta$ and estimated variance
$$
(x_1-x_2)^T\widehat{\operatorname{Var}}(\widehat\beta)(x_1-x_2)+2\widehat\sigma^2.
$$
A <Student t confidence interval>[Student t interval] on this logarithmic scale can be exponentiated to obtain a prediction interval for the positive ratio.