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.
Simulate B and C using Unifoorm Distribution
# Using a sample of 5000 random numbers from uniform distribution from zero (0) to one (1)
B = runif(5000, min=0, max=1 )
C = runif(5000, min=0, max=1 )
Find the probability that:
A <- B + C
print(length(A[A < 0.5])/length(A))
## [1] 0.1282
The result shows that B + C is less than 0.5
A <- B*C
print(length(A[A < 0.5])/length(A))
## [1] 0.8468
(c)|B − C| < 1/2.
A <- abs(B-C)
print(length(A[A < 0.5])/length(A))
## [1] 0.7488
A <- pmax(B,C)
print(length(A[A < 0.5])/length(A))
## [1] 0.2474
A <- pmin(B,C)
print(length(A[A < 0.5])/length(A))
## [1] 0.7476