# Gamma GLM - Derive prediction intervals for new x_i

In a Gamma GLM, the statistical model for each observation 𝑖 is assumed to be $$Y_i \sim Gamma(shape, scale)$$, where $$E(Y_i) = \mu_i = f(X_i\beta)$$, and $$f$$ is the link function.

I've used MLE to estimate $$\hat{\beta}$$ and $$\hat{scale}$$, and wish to produce a 90% prediction interval on a new point $$Y'$$ given $$X'$$.

I can produce the confidence intervals on $$E(Y|X') = \mu'$$ by using link function $$f$$ on the normally distributed confidence intervals for $$X\hat{\beta}$$. Let's say $$\hat{\mu'} = 10$$ and 90% confidence intervals are [5, 30].

However, we want the intervals from the distribution of $$Y'$$, not $$\mu'$$. Intuitively, these intervals should be much wider than the confidence intervals for $$\mu'$$ I think they should also be wider than the 5th and 95th percentile of a single Gamma distribution with $$\mu=\hat{\mu'}$$, since the uncertainty around $$\hat{\mu'}$$ should translate into increased uncertainty around the final distribution, sort of like an vague prior on a bayesian posterior distribution.

What is the correct way to model prediction intervals on the new point $$Y'$$?

The below schema shows how uncertainty on $$\mu'$$ translates into many possible gamma distributions and a wide prediction interval for $$Y'$$

References:

https://www.rocscience.com/help/swedge/swedge/Gamma_Distribution.htm

https://www.statsmodels.org/stable/glm.html

• The interval you are asking for is called a prediction-interval. A confidence interval is something else. – whuber Aug 21 at 19:39
• Thanks @whuber, fixed – Nelson Aug 21 at 19:50

• Note that predicting y_i usually means to predict the mean or expected value and not an observation. You would need a draw from the predictive distribution for a new observation. Something like that is an option that includes all estimation uncertainty and what I meant with full bootstrap. The disadvantage is that it is costly to compute because the model has to be estimated for each draw of a bootstrap sample. Using the original parameter estimates as starting values will speed up the computations but there is still a large amount of overhead to compute. – Josef Aug 22 at 1:21