# Standard deviation of function of two RVs

I've stumbled upon a problem that basically reduces to having two random variables $$X \sim N(\mu_X,\sigma_X)$$ $$Y \sim N(\mu_Y,\sigma_Y)$$ and defining the third as $$Z = \sqrt{X^2 + Y^2}$$ Although it would be convenient to have the exact expressions for mean and standard deviation I can safely assume the coefficients of variation $V_X$ and $V_Y$ are small, therefore I deduced $$\mu_Z \approx \sqrt{\mu_X^2+\mu_Y^2}$$ but the standard deviation is giving me a hard time $$\sigma_Z \approx \;??$$ Does anyone have any pointers on how to determine it?

It turns out using a multi-variate Taylor expansion about $X = \mu_X, Y = \mu_Y$ leads to the best result, a first order approximation writes $$Z \approx \sqrt{\mu_X^2+\mu_Y^2} + \frac{\mu_X}{\sqrt{\mu_X^2+\mu_Y^2}}(X-\mu_X) + \frac{\mu_Y}{\sqrt{\mu_X^2+\mu_Y^2}}(Y-\mu_Y)$$ such that $$\mu_Z \approx \sqrt{\mu_X^2+\mu_Y^2}$$ $$\sigma_Z \approx \sqrt{\frac{\mu_X^2 \sigma_X^2 + \mu_Y^2 \sigma_Y^2}{\mu_X^2 + \mu_Y^2}}$$

• $$E[Z^2]=E[X^2+Y^2]=E[X^2]+E[Y^2]=(\mu_X^2+\sigma_X^2)+(\mu_Y^2+\sigma_Y^2)$$ and $\sigma_Z^2 = E[Z^2]-\mu_Z^2$. – Dilip Sarwate Mar 31 '13 at 14:58
• Also, do you know what the geometric mean is? – Dilip Sarwate Mar 31 '13 at 15:00
• Okay, so that would basically leave me with $\sigma_Z \approx \sqrt{\sigma_X^2 + \sigma_Y^2}$. Comparing this with a Monte Carlo simulation yields a significant discrepancy... Also, I messed up by calling this the geometric mean, sorry. – demorge Mar 31 '13 at 15:08

I'm not sure I understand how you got $\mu_Z$ but assuming you have it, by definition:

$$\sigma_Z^2 = Var(Z) = \left<Z^2\right>-\mu_Z^2$$

Now

$$\left<Z^2\right> = \left<X^2+Y^2\right> = \left<X^2\right>+\left<Y^2\right>$$

Which, using the difintion, $\sigma_X^2 = \left<X^2\right>-\mu_X^2$ becomes

$$\left<Z^2\right> = \left(\sigma_X^2+\mu_X^2\right) + \left(\sigma_Y^2+\mu_Y^2\right)$$

Therefore

$$\sigma_Z^2 = \sigma_X^2 + \sigma_Y^2 +\mu_X^2 +\mu_Y^2 - \mu_Z^2$$

• Indeed, this is what I got at first too. Simplifying the last expression by inserting $\mu_Z$ results in $\sigma_Z \approx \sqrt{\sigma_X^2 + \sigma_Y^2}$, but that doesn't compare well with a Monte Carlo simulation... any ideas? – demorge Mar 31 '13 at 15:13
• Perhaps you could check both the estimation and your method for easier cases first such as $\mu_x=\mu_Y=0$ and $\sigma_X=\sigma_Y$? Have you written the simulation yourself? – Guest 86 Mar 31 '13 at 15:25
• Yes, I checked that (using a Maple simulation) and it seems that only for very small coefficients of variation it is ok, for larger values the distribution of $Z$ becomes non-Gaussian. I think this is the best we can do :). – demorge Mar 31 '13 at 15:31
• Right it seems like a Gaussian multiplied by an Erf. Still I think you could try to estimate it using a higher order approximation? – Guest 86 Mar 31 '13 at 15:43
• @Guest86 I've used a higher order multi-variate Taylor series expansion and this gives better result (although leading to lengthy expressions for very high accuracy), I've added the answer to my original post. – demorge Mar 31 '13 at 19:31