# Are these two distributions identical?

Let $X=\sum_{i=1}^r \lambda_{i}\|\sum_{n=1}^Ng_n\alpha_{n,i}\|^2$ and $Y=\sum_{i=1}^r \lambda_{i}\sum_{n=1}^N\|g_n\|^2\|\beta_{i}\|^2$, where $\alpha_{n,i}$'s, $\beta_i$'s and $g_n$'s are all i.i.d complex Gaussian r.v.s with zero mean and unit variance, then the random variables $X$ and $Y$ are identically distributed.

I have a proof, but not sure if it is right or wrong.

Let $X_i=\sum_{n=1}^Ng_n\alpha_{n,i}$, and $Y_i=\sqrt{\sum_{n=1}^N\|g_n\|^2}\beta_{i}$. It is clear that the conditional random variable $X_i|_{g_1,...,g_N}$ is complex gaussian, with mean \begin{align} E(X_i|g_1,...,g_N)=\sum_{n=1}^Ng_nE(\alpha_{n,i})=0, \end{align} and variance \begin{align} &E(\|X_i\|^2|g_1,...,g_N)-\|\left(E(X_i|g_1,...,g_N)\right)\|^2 \nonumber\\ =&\sum_{n=1}^N\|g_n\|^2E(\|\alpha_{n,i}\|^2)-\sum_{n_1\neq n_2}g_{n_1}g_{n_2}^HE(\alpha_{n_1,i}\alpha_{n_2,i}^H)-0\nonumber\\ =&\sum_{n=1}^N\|g_n\|^2. \end{align} Therefore $X_i|_{g_1,...,g_N}$ has the same distribution as the conditional variable $Y_i|_{g_1,...,g_N}=\sqrt{\sum_{n=1}^N\|g_n\|^2}\beta_{i}|_{g_1,...,g_N}$. This implies that the conditional random variables $X|_{g_1,...,g_N}=\sum_{i=1}^r\lambda_i\|X_i|_{g_1,...,g_N}\|^2$ and $Y|_{g_1,...,g_N}=\sum_{i=1}^r\lambda_i\|Y_i|_{g_1,...,g_N}\|^2$ are also identically distributed. Consequently, the marginal distribution of $X$ is same as that of $Y$: \begin{align} f_{X}(x) =&\int_{z}f_{X|Z}(x|z)f_Z(z)dz \nonumber\\ =&\int_{z}f_{Y|Z}(x|z)f_Z(z)dz=f_{Y}(x), \end{align}

-