spinner_bayes {ProbBayes} | R Documentation |
Implements Bayes' rule for a spinner problem
Description
Computes and plots the posterior distribution of spinners given a sequence of spins
Usage
spinner_bayes(list_regions,
prior,
data,
plot=TRUE)
Arguments
list_regions |
list of vectors of integer areas for the spins 1, 2, ... |
prior |
a vector containing the prior probabilities for the spinners |
data |
a vector containing the spin values where 1, 2, 3, ... are the possible spins |
plot |
if plot=TRUE, a comparative graph of the prior and posterior probabilities is displayed |
Value
A data frame with variables Spinner, Prior, Likelihood, Product, and Posterior
Author(s)
Jim Albert
Examples
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)
[Package ProbBayes version 1.1 Index]