Exponential-mean confidence interval by pivot inversion (source code)

= Exponential-mean confidence interval by pivot inversion
{title2=$\left(\bar Y/(1+z/\sqrt n),\bar Y/(1-z/\sqrt n)\right)$}

For an <exponential distribution> with mean $\theta$, the <maximum-likelihood estimator> is $\bar Y$ and $\sqrt n(\bar Y-\theta)/\theta$ converges to a standard <normal distribution>. Inverting the event that this pivot lies between $-z$ and $z$ gives the displayed <confidence interval>, provided $n>z^2$. Its two-sided <coverage probability> has error $O(n^{-1})$, because the first <Edgeworth expansion> term is even and cancels between the two tails.