Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|cite|improve this question

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.

share|cite|improve this answer

A Gaussian (normal) distribution has the formula

$F(x)={1\over \sigma \sqrt{ 2 \pi}} e^{-(x-\mu)^2\over2\sigma^2}$

Set up $\sigma_1$, $\mu_1$, $\sigma_2$ and $\mu_2$ and work it through.

share|cite|improve this answer
Thankyou.Can you please provide some sample.Also how can I plot in scilab?I am a beginner using scilab. – user63827 Mar 24 '13 at 3:25
We have to estimate and plot probability density function of Z in scilab based on the sample data. – user63827 Mar 24 '13 at 3:36
No idea what scilab is and don't plan to learn, sorry. – Dale M Mar 24 '13 at 11:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.