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
B=seq(0,1,length=2000)
C=seq(0,1,length=2000)
y=dnorm(punif(B, min = 0, max = 1) + runif(C, min = 0, max = 1))
boxplot(subset(y,y<.5),type="l", lwd=2, col="blue")
length(subset(y,y<.5))/length(y)
## [1] 1
hist(y)
B=seq(0,1,length=2000)
C=seq(0,1,length=2000)
y=dnorm(punif(B, min = 0, max = 1) * runif(C, min = 0, max = 1))
boxplot(subset(y,y<.5),type="l", lwd=2, col="blue")
length(subset(y,y<.5))/length(y)
## [1] 1
hist(y)
B=seq(0,1,length=2000)
C=seq(0,1,length=2000)
y=dnorm(punif(B, min = 0, max = 1) - runif(C, min = 0, max = 1))
boxplot(subset(y,y<.5),type="l", lwd=2, col="blue")
length(subset(y,y<.5))/length(y)
## [1] 1
hist(y)
B=seq(0,1,length=2000)
C=seq(0,1,length=2000)
y=dnorm(max(punif(B, min = 0, max = 1), runif(C, min = 0, max = 1)))
boxplot(subset(y,y<.5),type="l", lwd=2, col="blue")
length(subset(y,y<.5))/length(y)
## [1] 1
B=seq(0,1,length=2000)
C=seq(0,1,length=2000)
y=dnorm(min(punif(B, min = 0, max = 1) , runif(C, min = 0, max = 1)))
boxplot(subset(y,y<.5),type="l", lwd=2, col="blue")
length(subset(y,y<.5))/length(y)
## [1] 1