Choose independently two numbers B and C at random from the interval [0, 1] with uniform density. Prove that B and C are proper probability distributions. Note that the point (B,C) is then chosen at random in the unit square.
Find the probability that:
\[P(B+C<1/2)\] \[=P(X+Y<1/2)\]
\[=P(0<X<1/2,0<Y<1/2−x)\]
\[=∫^{1/2}_0∫^{1/2−x}_0f(x,y)dxdy\]
\[=∫_0^{1/2}∫_0^{1/2−x}1.dydx\] \[=∫^{1/2}_0[1/2−x]dx\]
\[=[1/2x−x^2/2]^{1/2}_0\] \[=1/4−1/8\]
\[=1/8\]
\[P(B.C<1/2)=∫^{1/2}_0f(z)dz\]
f <- function(x) {x}
res = integrate(f, lower = 0, upper = 0.5)
res
## 0.125 with absolute error < 1.4e-15
\[P (|B - C| < 1/2 given that 0 < x + y < 1)\]
\[P(|X−Y|<1/2 given that 0<x+y<1)\] \[=P(−1/2<X−Y<1/2;0<X<1−Y)\] \[=P(0<X<1/2−Y;0<Y<1/2)\] \[=∫^{1/2}_0∫^{1/2−y}_0f(x,y)dxdy\] \[=∫^{1/2}_0∫^{1/2−y}_01.dxdy\]
\[=∫^{1/2}_0[x]^{1/2−y}_0dy\]
\[=[Y/2−Y^2/2]^{1/2}_0\] \[=1/4−1/8\] \[=0.125\]
\[=P(max(B,C)<1/2)\]
\[=P(B<=1/2,C<=1/2)\] \[=P(B<=1/2)P(C<=1/2)\]
\[=1/2∗1/2\] \[=1/4\]
\[=P(min(B,C)<=1/2)\] \[=1−P(min(B,C)>1/2)\] \[=1−P(B>1/2,C>1/2)\] \[=1−P(B>1/2)P(C>1/2)\] \[=1−[1−P(B>1/2)][1−P(C>1/2)]\] \[=1−[1−1/2][1−1/2]\] \[=1−[1/2][1/2]\]
\[=1−1/4\]
\[=3/4\]