Choose independently two numbers B and C at random from the interval [0, 1] with uniform density. Note that the point (B,C) is then chosen at random in the unit square. Find the probability that
B <- runif(10000, min=0, max=1)
C <- runif(10000, min=0, max=1)
sum ((B+C) < 0.5) / length(B)
## [1] 0.1245
sum ((B*C) < 0.5) / length(C)
## [1] 0.8405
sum (abs(B-C) < 0.5) / 10000
## [1] 0.7552
bc_max <- pmax (B,C)
prob_max <- sum(bc_max < 0.5) / 10000
prob_max
## [1] 0.2494