- Method of Composition
- Monte Carlo Justification
- Conjugate, Improper, and Flat Priors
n <- 10000 t1 <- rbeta(n, (1+32), (1+80-32)) t2 <- rbeta(n, (2+35), (1+100-35)) y1.new <- rbinom(n, 50, t1) y2.new <- rbinom(n, 50, t2)
gamma <- y1.new - y2.new - 5 w <- as.numeric(gamma>0) prob.est <- mean(w) sd.est <- sd(w) / sqrt(length(w)) round(c(prob.est, sd.est), 4)
## [1] 0.2901 0.0045