# Variance of the maximum likelihood estimator of Rayleigh Distribution

I want to calculate the variance of the maximum likelihood estimator of a Rayleigh distribution using $N$ observations.

The density probability function of this distribution is :

$$f(\sigma,y_i) = \frac{y_i}{\sigma^2} e^{-\frac{y_i^2}{2\sigma^2}}$$

I also know that the mean is $\sigma \sqrt{\frac{\pi}{2}}$, its variance is $\frac{4 - \pi}{2}\sigma^2$ and its raw moments are $E[Y_i^k] = \sigma^k 2^{\frac{k}{2}}\Gamma(1+\frac{k}{2})$. Knowing this, I was able to calculate the maximum likelihood estimator $\hat{\sigma}^{2,ML} = \frac{\sum_{i=1}^{N} y_i^2}{2N}$

I calculated the mean of this estimator : $m_{\hat{\sigma}^{2,ML}} = E[\frac{\sum_{i=1}^{N} y_i^2}{2N}] = \frac{2N \sigma^2}{2N} = \sigma^2$ knowing that $E[y_i^2] = \sigma^2 2 \Gamma(2) = 2\sigma^2$.

For the variance, however, I do not see how to do it. I have tried to do as follows:

$$Var(Z) = E[Z^2] - E[Z]^2 = E[(\frac{\sum_{i=1}^{N} y_i^2}{2N})^2] - E[\frac{\sum_{i=1}^{N} y_i^2}{2N}]^2 = \frac{1}{2N} E[(\sum_{i=1}^{N}y_i^2)^2] - \sigma^4$$

My problem is that I do not know how to calculate $E[(\sum_{i=1}^{N}y_i^2)^2]$. Could someone give me a hint?

## migrated from mathoverflow.netApr 9 '15 at 23:37

This question came from our site for professional mathematicians.

• Duplicate of same question by same author at: math.stackexchange.com/questions/1227137/… – wolfies Apr 10 '15 at 8:53
• This appears to be routine bookwork. As such I've added the self-study tag (if you had an account here I'd ask you to do t). Please see its tag wiki for how we treat such questions. – Glen_b Apr 10 '15 at 8:54

Note that $$\left(\sum y_i^2\right)^2=\sum_i y_i^2 \sum_j y_j^2$$ $$=\sum_i y_i^4+\sum_{i\ne j}y_i^2y_j^2 =\sum_i y_i^4+2\sum_{i<j} y_i^2y_j^2.$$
The expectation of this is then found from the moments of the Rayleigh distribution and using independence when $i\ne j$ to get $$E(y_i^2y_j^2)=\left(E(y_i^2)\right)^2.$$
If $Y_i\stackrel{_\text{iid}}{\sim}\text{Rayleigh}(\sigma)$ then $Y_i^2\sim\text{gamma}(1,2\sigma^2)$ (in the shape-scale parameterization); this is fairly easy to show.
Hence $\sum_{i=1}^N Y_i^2\sim\text{gamma}(N,2\sigma^2)$ (as mentioned on the Wikipedia page).
Consequently the distribution of $\hat{\sigma}^2$ and its mean and variance are simple to obtain.