best_poisson_bandit: best_poisson_bandit

View source: R/best_poisson_bandit.R

best_poisson_banditR Documentation

best_poisson_bandit

Description

Compute the Bayesian probabilities for each arm being the best poisson bandit.

Usage

best_poisson_bandit(x, n = NULL)

Arguments

x

as in prop.test, a vector of the number of successes; it may alternatively be a list of vectors of the results of each trial, if n is not provided

n

as in prop.test, a vector of the number of trials; if it is not provided, x must be a list of vectors of the results of each trial

Value

a vector of probabilities for each arm being the best poisson bandit; this can be used for future randomized allocation

Author(s)

Thomas Lotze <thomaslotze@thomaslotze.com>

References

Steven L. Scott, A modern Bayesian look at the multi-armed bandit, Appl. Stochastic Models Bus. Ind. 2010; 26:639-658. (http://www.economics.uci.edu/~ivan/asmb.874.pdf)

See Also

prop.test

Examples

p1 = rpois(100, lambda=10)
p2 = rpois(100, lambda=9)
x = sapply(list(p1, p2), sum)
n = sapply(list(p1, p2), length)
best_poisson_bandit(x,n)

bandit documentation built on June 29, 2022, 5:05 p.m.