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.

#generating 100 random numbers between 0 and 1
b <- runif(10000, min = 0, max = 1)
c <- runif(10000, min = 0, max = 1)

Find the probability that

  1. \(B + C < 1/2\)
x <- b + c

sum((x)<.5)/10000
## [1] 0.1311
  1. \(B * C / 1/2\)
x <- b * c
sum((x)<.5)/ 10000
## [1] 0.8468
  1. \(|B - C| < 1/2\)
x <- abs(b - c)
sum((x)<.5)/10000
## [1] 0.7579
  1. \(max {B,C} < 1/2\)
x <- pmax(b,c)

sum((x)<.5)/10000
## [1] 0.2554
  1. \(min {B,C} < 1/2\)
x <- pmin(b,c)

sum((x)<.5)/10000
## [1] 0.7485