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.
Using the uniform ditribution function - runif to allocate random numbers
set.seed(123)
B <- runif(10000, min = 0, max = 1)
set.seed(234)
C <- runif(10000, min = 0, max = 1)
Find the probability that
sum((B + C) < 0.5) / 10000
## [1] 0.1266
sum((B*C) < 0.5) / 10000
## [1] 0.8466
sum(abs(B-C) < 0.5) / 10000
## [1] 0.7527
sum(pmax(B,C) < 0.5) / 10000
## [1] 0.2535
sum(pmin(B,C) < 0.5) / 10000
## [1] 0.7499