Why conditional probability of dependent events seems equal to product of their probabilities

90 Views Asked by At

I've set up computational experiment about probabilities of dependent events with absolutely continuous random variables with uniform distribution, and can explain to myself every but one result. Please help me understand one confusing identity that I observe (the last one).

Let's denote:

  • x1 and x2 are independent continuous random variables with uniform distribution in range [0...1]
  • t=0.29 is some arbitrary threshold in range (0...1)
  • event A: x1 < t
  • event B: x2 < t
  • event C: x1+x2 < t
  • event D: x1+x2 > 1

I can't explain why P(D|A) = P(A) * P(D)

Below is the output of my program with my brief comments after double slashes:

N                                 = 21'206'401'024 // number of experiments

P(x1 < t)                         = 0.2900041482776781 // P(A)
P(x2 < t)                         = 0.2899998412290706 // P(B)
// P(A) = P(B), ignoring small difference because N is not infinity.

P(x1+x2 < t)                      = 0.0420523411299609 // P(C)
P(x1+x2 > 1)                      = 0.5000020777688751 // P(D)
// PDF for x1 is "rectangle" of height 1 and base [0...1].
// PDF for x2 is "rectangle" of height 1 and base [0...1].
// Using convolution we can show that PDF for x1+x2 is isosceles "triangle"
// of height 1 and base [0...2], so we can confirm on paper that P(D) = 1/2
// by calculating area of right half of this triangle.
// Analogously, P(C) = t*t/2

P(x1 < t AND x2 < t)              = 0.0841023415515694 // P(A,B)
P(x1 < t) * P(x2 < t)             = 0.0841011569562985 // P(A) * P(B)
// P(A,B) = P(A)*P(B) because A and B are independent.

P(x1 < t AND x1+x2 > 1)           = 0.0420498124123374 // P(A,D)
P(x1 < t) * P(x1+x2 > 1 | x1 < t) = 0.0420498124123374 // P(A) * P(D|A)
// Using conditional probability: P(A,D) = P(A) * P(D|A),
// works for both independent and dependent events.

P(x1+x2 < t)                      = 0.0420523411299609 // P(C)
P(x1 < t AND x1+x2 < t)           = 0.0420523411299609 // P(A,C)
P(x1 < t) * P(x1+x2 < t)          = 0.0121953533724767 // P(A) * P(C)
// P(A,C) = P(C) because if x1+x2 < t, x1 is definitely < t
// Using conditional probability: P(A,C) = P(C) * P(A|C) = P(C)
// P(A|C) = 1
// P(A,C) =/= P(A)*P(C) because A and C are dependent.

P(x1 < t) * P(x1+x2 > 1)          = 0.1450026767004320 // P(A) * P(D)
P(x1+x2 > 1 | x1 < t)             = 0.1449972790460737 // P(D|A)
// I can't explain why P(D|A) = P(A) * P(D) ???

Text of the program: https://godbolt.org/z/ca5zfbqTK

It can be compiled and executed on Linux.

1

There are 1 best solutions below

2
On BEST ANSWER

Clearly, $P(A)=t$. Meanwhile, $P(A,D)$ is the area of the green triangle below, which is $t^2/2$. And $P(D)=1/2$ (it is the combined area of the blue and green regions below). enter image description here Thus, $$P(D|A)={P(A,D)\over P(A)}={t^2/2 \over t}=t\cdot {1 \over 2}=P(A)P(D).$$