sim_post | R Documentation |
Simulate the posterior distribution the Bayesian probabilities for each arm being the best binomial bandit
sim_post(x, n, alpha = 1, beta = 1, ndraws = 5000)
x |
as in prop.test, a vector of the number of successes |
n |
as in prop.test, a vector of the number of trials |
alpha |
shape parameter alpha for the prior beta distribution. |
beta |
shape parameter beta for the prior beta distribution. |
ndraws |
number of random draws from the posterior |
Thomas Lotze and Markus Loecher
x=c(10,20,30,50) n=c(100,102,120,130) sim_post(x,n)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.