= Solution
Let $F$ be the <cumulative distribution function> of a <gamma distribution> with shape $A=a+\sum_ix_i$ and rate $B=b+n$; explicitly,
$$
F(t)=\frac{B^A}{\Gamma(A)}\int_0^t u^{A-1}e^{-Bu}\,du\quad(t\geq0).
$$
The <posterior distribution> is continuous and has positive density on $(0,\infty)$, so its <quantiles> give the requested <equal-tailed credible interval>:
$$
\boxed{[F^{-1}(\alpha/2),\ F^{-1}(1-\alpha/2)].}
$$
Equivalently, $2B\theta\mid x\sim\chi^2_{2A}$, so the endpoints can be written as the corresponding <chi-squared distribution> quantiles divided by $2B$. Either form excludes posterior <probability> $\alpha/2$ from each tail.
Back to article page