0
$\begingroup$

I don't understand why

Probability[X < Y, {X \[Distributed] NormalDistribution[0, 1],
  Y \[Distributed] NormalDistribution[0, 1]}]

gives 1/2

while we know that X/Y is Cauchy(0,1) and that

Probability[Z < 1, Z \[Distributed] CauchyDistribution[0, 1]]

gives 3/4

I tried many different approaches and I can't figure out why we have this difference.

$\endgroup$
4
  • $\begingroup$ Try Probability[Abs[x] <= 1, x \[Distributed] CauchyDistribution[0, 1]]? $\endgroup$
    – kglr
    Dec 5, 2014 at 23:03
  • $\begingroup$ kguler, this does not even run. I am trying to calculate P(X < Y), I just don't understand where the discrepancy is coming from. In fact, there should not be a reason to take absolute value since X, Y are independent and may be positive or negative $\endgroup$
    – user23014
    Dec 5, 2014 at 23:06
  • $\begingroup$ never mind, this worked: Probability[Z < 1 && Z > -1, Z [Distributed] CauchyDistribution[0, 1]] $\endgroup$
    – user23014
    Dec 5, 2014 at 23:11
  • $\begingroup$ Probability[Abs[Z] < 1, Z [Distributed] CauchyDistribution[0, 1]] ran fine for me, giving 1/2. $\endgroup$ Dec 6, 2014 at 0:00

1 Answer 1

1
$\begingroup$

Question

If $X \sim N(0,1)$ and $Y \sim N(0,1)$ are independent, how come:

$$ P(X<Y) = \frac12 \quad \text{while} \quad P(\frac{X}{Y}<1) = \frac34$$

Answer

Nothing to do with Mma. The answer is that the rules of standard algebra do NOT apply to the algebra of random variables, so you cannot simply divide both parts of $P(X<Y)$ by $Y$ ... to get $P(\frac{X}{Y}<1)$ ... , which is what you seem to be doing. Note that $\frac{Y}{Y} \neq 1$, since this denotes the ratio of two random variables (not 2 fixed numbers).

Similarly: $P(X<0) \neq P(X^2<0) \quad$ (The former is $\frac12$; the latter is 0)


P.S. An easy solution to $P(X<Y)$ is:

  • Let $Z = (X-Y) \sim N(0, 2)$.

  • $P(X<Y) = P(X-Y<0) = P(Z<0) = \frac12$ .

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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