Compute "value_remaining" in arms not currently best in binomial bandits

value_remaining(x, n, alpha = 1, beta = 1, ndraws = 10000)

Arguments

x

Vector of the number of successes per arm.

n

Vector of the number of trials per arm.

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.

Value

Value_remaining distribution; the distribution of improvement amounts that another arm might have over the current best arm.

Examples

x <- c(10,20,30,80) n <- c(100,102,120,240) vr <- value_remaining(x, n) hist(vr)
# "potential value" remaining in the experiment potential_value <- quantile(vr, 0.95)