In this question, I explored the Rayleigh distribution, with PDF
$$f_{\sigma}(x) = \dfrac{x}{\sigma^2} e^{-\dfrac{x^2}{2\sigma^2}},$$
where $x \ge 0$.
I calculated that the MLE is $\hat{\sigma^2} = \sqrt{\dfrac{1}{n} \sum_{i = 1}^n \dfrac{x_i^2}{2}}$. I now want to check whether it's unbiased. Is my calculation for the MLE correct? How do I check whether it's biased?
Thanks to COOLSerdash's comments, I realised that the MLE is actually $\hat{\sigma^2} = \dfrac{1}{n} \sum_{i = 1}^n \dfrac{x_i^2}{2}$, since we're finding the MLE for $\hat{\sigma^2}$ rather than $\hat{\sigma}$.
I now want to check whether the MLE is biased. I begin by taking the expected value of the MLE:
$$E\left(\hat{\sigma^2}\right) = \dfrac{1}{2n} E\left(\sum_{i = 1}^n x_i^2 \right)$$
We bring the expected value inside the summation:
$$E\left(\hat{\sigma^2}\right) = \dfrac{1}{2n} \sum_{i = 1}^n E(x_i^2)$$
So how do I find $E(x_i^2)$?