powered by
Computes and plots the posterior distribution of spinners given a sequence of spins
spinner_bayes(list_regions, prior, data, plot=TRUE)
list of vectors of integer areas for the spins 1, 2, ...
a vector containing the prior probabilities for the spinners
a vector containing the spin values where 1, 2, 3, ... are the possible spins
if plot=TRUE, a comparative graph of the prior and posterior probabilities is displayed
A data frame with variables Spinner, Prior, Likelihood, Product, and Posterior
# NOT RUN { regions1 <- c(1, 1, 1) regions2 <- c(2, 1, 2, 1) data <- c(1, 1, 1, 2) spinner_bayes(list(regions1, regions2), prior=c(0.5, 0.5), data) # }
Run the code above in your browser using DataLab