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
x <- b + c
sum((x)<.5)/10000
## [1] 0.1311
x <- b * c
sum((x)<.5)/ 10000
## [1] 0.8468
x <- abs(b - c)
sum((x)<.5)/10000
## [1] 0.7579
x <- pmax(b,c)
sum((x)<.5)/10000
## [1] 0.2554
x <- pmin(b,c)
sum((x)<.5)/10000
## [1] 0.7485