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.

\[B + C < 1/2\]

n = 10000

B = runif(n, min = 0, max = 1)
C = runif(n, min = 0, max = 1)

sum((B+C) <0.5)/n
## [1] 0.1233

\[BC < 1/2\]

sum((B*C)<0.5)/n
## [1] 0.8446

\[|B - C| < 0.5\]

sum(abs(B-C)<0.5)/n
## [1] 0.7418

\[max(B,C) < 0.5\]

index <- 0

for (x in 1:n){
  if(max(c(B[x],C[x])) < 0.5 ){
    index = index + 1

}
}

index/n
## [1] 0.2486

\[min(B,C) < 0.5\]

index <- 0

for (x in 1:n){
  if(min(c(B[x],C[x])) < 0.5 ){
    index = index + 1

}
}

index/n
## [1] 0.7513