powered by
Simulates the posterior distribution of the Bayesian probabilities for each arm being the best binomial bandit.
sim_post(x, n, alpha = 1, beta = 1, ndraws = 5000)
Vector of the number of successes per arm.
Vector of the number of trials per arm.
Shape parameter alpha for the prior beta distribution.
Shape parameter beta for the prior beta distribution.
Number of random draws from the posterior.
Matrix of bayesian probabilities for each arm being the best binomial bandit
# NOT RUN { x <- c(10,20,30,50) n <- c(100,102,120,130) sp <- sim_post(x,n) # }
Run the code above in your browser using DataLab