Each year, the maximum height $X$ of a river is measured. A value over $6\,\text{m}$ would be catastrophic. The distribution $X$ is supposed to be Rayleigh, i.e its density is $$f_{X}(x)=(x/a)e^{-x^{2}/(2a)}\text{,}\ \ x>0 \ \text{,}\ a>0$$ where $a$ is unknown. We observed the following heights in meter over eight years:$$2.5,\ 2.9,\ 1.8,\ 0.9,\ 1.7,\ 2.1,\ 2.2,\ 2.8$$ a) Give the maximum likelihood estimate for $a$.
b) Compute the standard error for the estimated probability $p$ of a catastrophe in a given year, and use it to give a confidence interval for $p$.
Okay, so I managed to do a), and found $\hat{a} = 2.42$ approx.
I also managed to find the estimated probability of a catastrophe in a given year, i.e $$\hat{p}=P(X>6 \ |\ a) = e^{-18/a}.$$
Now, when it comes to computing the standard error, i.e the root of the variance of $\hat{p}$, I do not know how exactly I can do that.
Here is my attempt:$$\operatorname{var}(\hat{p}) = \operatorname{var}(\hat{p}(\hat{a})) = \hat{p}'(\hat{a})\cdot \operatorname{var}(\hat{a}).$$
Now, how do I compute $\operatorname{var}(\hat{a})$?
$\def\dto{\xrightarrow{\mathrm{d}}}\def\vec{\boldsymbol}$First, because$$ L(a; \vec{x}) = f_{\vec{X}}(\vec{x}; a) = \prod_{k = 1}^n \frac{x_k}{a} \exp\left( -\frac{x_k^2}{2a} \right) = \frac{1}{a^n} \left( \prod_{k = 1}^n x_k \right) \exp\left( -\frac{1}{2a} \sum_{k = 1}^n x_k^2 \right),\\ l(a; \vec{x}) = \ln(L(a; \vec{x})) = -\frac{1}{2a} \sum_{k = 1}^n x_k^2 - n \ln a + \sum_{k = 1}^n \ln x_k, $$ then$$ \frac{\partial l}{\partial a}(a; \vec{x}) = \frac{1}{2a^2} \sum_{k = 1}^n x_k^2 - \frac{n}{a} \Longrightarrow \widehat{a}_n = \frac{1}{2n} \sum_{k = 1}^n X_k^2. $$
Next, since $X_1, \cdots, X_n$ are i.i.d, then $X_1^2, \cdots, X_n^2$ are also i.i.d., and$$ f_{X_1}(x; a) = \frac{x}{a} \exp\left( -\frac{x^2}{2a} \right)\ (x > 0) \Longrightarrow f_{X_1^2}(y; a) = \frac{1}{2a} \exp\left( -\frac{y}{2a} \right)\ (y > 0). $$ Thus,$$ D(\widehat{a}_n) = \frac{1}{4n^2} D\left( \sum_{k = 1}^n X_k^2 \right) = \frac{1}{4n} D(X_1^2) = \frac{a^2}{n}. $$
Now, note that$$ p = P_a(X > 6) = \exp\left( -\frac{18}{a} \right) \Longrightarrow \widehat{p}_n = \exp\left( -\frac{18}{\widehat{a}_n} \right). $$ Since $E(X_1^2) = 2a$, $D(X_1^2) = 4a^2$, by the central limit theorem,$$ \sqrt{n} · \frac{2 \widehat{a}_n - E(X_1^2)}{\sqrt{\smash[b]{D(X_1^2)}}} \dto N(0, 1) \Longrightarrow \sqrt{n} (\widehat{a}_n - a) \dto N(0, a^2). $$ Define $g(x) = \exp\left( -\dfrac{18}{x} \right)$. By the delta method,$$ \sqrt{n} (\widehat{p}_n - p) = \sqrt{n} (g(\widehat{a}_n) - g(a)) \dto N(0, (g'(a))^2 · a^2) = N\left( 0, 18\exp\left( -\frac{18}{a} \right) \right). $$ Thus approximately, $\widehat{p}_n - p \sim N\left( 0, \dfrac{18}{n} \exp\left( -\dfrac{18}{a} \right) \right)$, and$$ D(\widehat{p}_n) ≈ \frac{18}{n} \exp\left( -\frac{18}{a} \right) ≈ \frac{18}{n} \exp\left( -\frac{18}{\widehat{a}_n} \right). $$