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.
Find the probability that
Here, we can use runif function to get the random numbers from the interval [0,1].
B <- runif(10000, min = 0, max = 1)
C <- runif(10000, min = 0, max = 1)
x <- B + C
# to find the probability
a <- sum(x < .5) / 10000
a
## [1] 0.1283
Therefore, the probability that B + C < 1/2 approximately 12%. Since, we are choosing the random numbers here, there will always be a different probability but not less than 12 and not more than 12.99%
x <- B * C
# to find the probability
b <- sum(x < .5) / 10000
b
## [1] 0.8501
Therefore, the probability that B * C < 1/2 approximately 84%. Since, we are choosing the random numbers here, there will always be a different probability. I checked 3-4 times the probability goes to 84.00% and 85.00% with some decimal value changes.
x <- abs(B - C)
# to find the probability
c <- sum(x < .5) / 10000
c
## [1] 0.7517
Therefore, the probability that |B-C| < 1/2 approximately 74%. Since, we are choosing the random numbers here, there will always be a different probability. I checked 3-4 times the probability goes to 74.00% and 75.00% with some decimal value changes.
x <- pmax(B,C)
# to find the probability
d <- sum(x < .5) / 10000
d
## [1] 0.2513
Therefore, the probability that max{B,C} < 1/2 approximately 24%. Since, we are choosing the random numbers here, there will always be a different probability. I checked 3-4 times the probability goes to 24.00% and 25.00% with some decimal value changes.
x <- pmin(B,C)
# to find the probability
e <- sum(x < .5) / 10000
e
## [1] 0.7502
Therefore, the probability that min{B,C} < 1/2 approximately 74%. Since, we are choosing the random numbers here, there will always be a different probability. I checked 3-4 times the probability goes to 74.00% and 75.00% with some decimal value changes.