Rayleigh as exponential family - compute $\mathbb{E}(Y)$ and Var$(Y)$ where Y is a sum of independent squared Rayleigh's distribution Prove that X of Rayleigh distribution with pdf $f(x, \sigma) = \frac{x}{\sigma^2}e^{-\frac{x^2}{2\sigma^2}}\mathbb{1}_{(0, \infty)}(x)$ comes from the exponential family and then compute $\mathbb{E}(Y)$ and Var$(Y)$ where $Y = \sum_{k=1}^nX^2_k$ (all $X_k$ are independent).
I did the first part:
$$
f(x, \sigma) = \frac{x}{\sigma^2}e^{-\frac{x^2}{2\sigma^2}}\mathbb{1}_{(0, \infty)}(x) =
xe^{-\frac{1}{2\sigma^2}x^2 - 2\ln(\sigma)}\mathbb{1}_{(0, \infty)}(x)
$$ 
so
$$
h(x) = x; \eta_1(\theta) = -\frac{1}{2\sigma^2}; T_1(x)=x^2; B(\theta)=2ln(\sigma)
$$
Why is the fact that Rayleigh's comes from an exponential family useful? Are there any equations to quickly solve the second part of the task? I appreciate any help.

The Rayleigh distribution is a single parameter exponential family if we can write it in the form
$$ f(x: \sigma) = h(x) \exp\left( \eta(\sigma) T(x) - A(\sigma) \right)$$
Here we have $$f(x: \sigma) = x \mathbb{1}_{[0,\infty)} (x) \exp \left( \frac{-1}{2\sigma^2} x^2 - 2 \log \sigma \right)$$
so it is indeed an exponential family, with $h(x) = x \mathbb{1}_{[0,\infty)} (x), \ T(x) = x^2, \ \eta(\sigma) = \frac{-1}{2\sigma^2}$ and $A(\sigma) = 2 \log \sigma.$ 
The moment generating function of a member of an exponential family has a particularly nice form:
$$ M_T(t) = \mathbb{E}[\exp(t T(x))] =  \exp\left( A(\eta + t) - A(\eta) \right) $$
Here, since $\eta = \frac{-1}{2\sigma^2}$ and $A(\sigma) = 2 \log \sigma,$ we can write $A(\eta) = - \log( -2 \eta).$
This gives $M_{T}(t) = \frac{\eta}{\eta + t},$ and differentiating this gives
$$ \frac{d}{dt} M_{T}(t) = \frac{-\eta}{(\eta + t)^2} \ , \ \frac{d^2}{dt^2} M_{T}(t) = \frac{2\eta}{(\eta + t)^3}.$$
Plugging in $t=0$ into these (and remembering $T = X^2$) we have 
$$ \mathbb{E}[X^2] = \frac{-1}{\eta} = 2\sigma^2 \ , \ \mathbb{E}[X^4] = \frac{2}{\eta^2} = 8 \sigma^4$$
From these we deduce $\text{Var}(X^2) = \mathbb{E}[X^4] - \mathbb{E}[X^2]^2 = 4 \sigma^4$ and therefore 
$$ \mathbb{E}[Y] = 2n \sigma^2 \ , \ \text{var}(Y) = 4n \sigma^4. $$
