Question
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 = runif(10000)
C = runif(10000)
Find the probability that
(a) B + C < 1/2
D <- B+C
#The number
CountAnsA <- sum(D < 0.5)
#The proportion
CountAnsA/5000
## [1] 0.2516
(b) BC < 1/2
D= B*C
CountAnsB <- sum(D < 0.5)
CountAnsB/5000
## [1] 1.7016
(c) |B - C| < 1/2
D <- abs(B-C)
CountAnsC <- sum(D < 0.5)
CountAnsC/5000
## [1] 1.5008
(d) max{B,C} < 1/2
D <- max(B,C)
CountAnsD <- sum(D < 0.5)
CountAnsD/5000
## [1] 0
(e) min{B,C} < 1/2
D <- min(B,C)
CountAnsE <- sum(D < 0.5)
CountAnsE/5000
## [1] 2e-04