Introduction

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(1000)
C <- runif(1000)

Checking if B and C are probability distributions

hist(B, probability = TRUE)

hist(C, probability = TRUE)

Both B and C are probability distributions and hence we can go further with the analysis.

(a) B + C < 1/2

Z <- B + C

probability <- length(Z[Z<= .5])/1000
probability
## [1] 0.142

(b) BC < 1/2

Z <- B*C

probability <- length(Z[Z<= .5])/1000
probability
## [1] 0.849

(c) |B − C| < 1/2

Z <- abs(B-C)

probability <- length(Z[Z<= .5])/1000
probability
## [1] 0.741

(d) max{B,C} < 1/2.

maxx <- matrix(c(B,C),1000,2)
Z <- apply(maxx, 1, max)

probability <- length(Z[Z<= .5])/1000
probability
## [1] 0.27

(e) min{B,C} < 1/2

minn <- matrix(c(B,C),1000,2)
Z <- apply(minn, 1, min)

probability <- length(Z[Z<= .5])/1000
probability
## [1] 0.759