[Math] probability density function with Gaussian distributed random variables

probabilityrandom variables

Create $100$ samples each of two Gaussian distributed random variables $X$ and $Y$ of your choice. Form a random variable $Z$ according to $z= \sqrt{x^2+y^2}$. Using these samples, estimate and plot the probability density function of $Z$.

Please suggest few inputs how to solve it. Thanks for your help.

Best Answer

If $X$ and $Y$ are independent standard normal random variables, the probability density function of $Z=\sqrt{X^2+Y^2}$ is $z\mathrm e^{-z^2/2}$ on $z\geqslant0$.

If $X$ and $Y$ are independent centered normal random variables with variance $\sigma^2$, the probability density function of $Z=\sqrt{X^2+Y^2}$ is $(z/\sigma^2)\mathrm e^{-z^2/(2\sigma^2)}$ on $z\geqslant0$.

If $X$ and $Y$ are independent normal random variables with different variances and/or not centered, things become more notationally involved.