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
n = 10000
b <- runif(n,min = 0, max = 1)
c <- runif(n,min = 0, max = 1)
a <- sum((b + c)<0.5)/n
a
## [1] 0.124
sum((b*c)< 0.5)/n
## [1] 0.8464
sum(abs(b-c)<0.5)/n
## [1] 0.7496
index <- 0
for (x in 1:n){
if(max(c(b[x],c[x])) < 0.5 ){
index = index + 1
}
}
index/n
## [1] 0.2438
index <- 0
for (x in 1:n){
if(min(c(b[x],c[x])) < 0.5 ){
index = index + 1
}
}
index/n
## [1] 0.7475