# Probability of one normdist being greater than another [duplicate]

I have two independant normally distributed random variables.

X ~ N(657, 3)
Y ~ N(661, 2)

P(x > y) = ?


How do I calculate the probability of X being greater than Y? Using R for simulating, I am getting values around 0.13. How to get the exact ("theoretical") value?

-

## marked as duplicate by ᴡᴏʀᴅs, Michael Albanese, T. Bongers, Claude Leibovici, 91500Jul 12 '14 at 7:22

Hint: Let $W=X-Y$. Then $W$ has normal distribution, with easily computed mean and variance. Note that in general if $U$ and $V$ are independent, then $$\text{Var}(aU+bV)=a^2\text{Var}(U)+b^2\text{Var}(V).$$

Remark: If you mean, as in the more standard convention, that the variances are $2$ and $3$, then the simulation was pretty good, the correct answer is close to $0.125$.

-

From Wikipedia, $$X-Y \sim N(-4,\sqrt{13})$$

and you want the probability of $X-Y>0$, that is, the standard normal being $> \frac{4}{\sqrt{13}}$ which comes out to around $0.13363$ from W|A.

Edit: I'm assuming the second parameter is standard deviation, and not variance.

-