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\Bigg(B+C < 1/2\Bigg) \] \[ = P\Bigg( X + Y < 1/2\Bigg) \]
\[ = P\Bigg( 0 < X < 1/2 , 0 < Y < 1/2 - x \Bigg) \]
\[=\int_{0}^{1/2}\int_{0}^{1/2-x} f(x,y) dxdy \]
\[=\int_{0}^{1/2}\int_{0}^{1/2-x} 1.dydx \] \[=\int_{0}^{1/2}[1/2-x] dx \]
\[ =\Bigg[ 1/2x - x^2/2 \Bigg]_{0}^{1/2} \] \[ =1/4 - 1/8 \]
\[ = 1/8 \]
\[ P\Bigg( B.C < 1/2\Bigg) = \int_{0}^{1/2} f(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\Bigg( -1/2 < X - Y < 1/2 ; 0 < X < 1 - Y \Bigg) \] \[ = P\Bigg( 0 < X < 1/2-Y ; 0 < Y < 1/2 \Bigg) \] \[=\int_{0}^{1/2}\int_{0}^{1/2-y} f(x,y)dxdy \] \[=\int_{0}^{1/2}\int_{0}^{1/2-y} 1.dxdy \]
\[=\int_{0}^{1/2}[x]_{0}^{1/2-y} dy \]
\[=[Y/2 - Y^2/2]_{0}^{1/2} \] \[ = 1/4 - 1/8 \] \[=0.125\]
\[ = P\Bigg( max(B,C )< 1/2\Bigg) \]
\[ = P\Bigg( B <= 1/2 ,C <=1/2 \Bigg) \] \[ = P\Bigg( B <= 1/2 \Bigg) P\Bigg( C <=1/2 \Bigg) \]
\[ = 1/2 * 1/2 \] \[ = 1/4\]
\[ = P\Bigg( min(B,C )<= 1/2\Bigg) \] \[ = 1 - P\Bigg( min(B,C ) > 1/2\Bigg) \] \[ = 1 - P\Bigg( B > 1/2,C >1/2 \Bigg) \] \[ = 1 - P\Bigg( B > 1/2\Bigg) P\Bigg( C > 1/2\Bigg) \] \[ = 1 - \Bigg[ 1 - P\Bigg( B > 1/2\Bigg)\Bigg] \Bigg[1 - P\Bigg( C > 1/2\Bigg)\Bigg] \] \[ = 1 - \Bigg[ 1 - 1/2\Bigg] \Bigg[1 - 1/2\Bigg] \] \[ = 1 - \Bigg[ 1/2\Bigg] \Bigg[1/2\Bigg] \]
\[ = 1 - 1/4 \]
\[ = 3/4 \]