Let x1, x2, ...xn be a random sample from a Rayleigh distribution whoose probability density is given by:

f(x;a) = 2*a*x*e^(-a*(x^2)) x>=0 a>0

Find an estimator for the parameter a by the method of max likelihood and the method of moments?

For the maximum likelihood, from trying to work it out I got n/(sum xi^2). Is this right?

i have no idea on how to find the method of moments!

Help appreciated. Thanks