Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

predplot

Plot of predictive distribution for binomial sampling with a beta prior


Description

For a proportion problem with a beta prior, plots the prior predictive distribution of the number of successes in n trials and displays the observed number of successes.

Usage

predplot(prior,n,yobs)

Arguments

prior

vector of parameters for beta prior

n

sample size

yobs

observed number of successes

Author(s)

Jim Albert

Examples

prior=c(3,10)  # proportion has a beta(3, 10) prior
n=20   # sample size
yobs=10  # observed number of successes
predplot(prior,n,yobs)

LearnBayes

Functions for Learning Bayesian Inference

v2.15.1
GPL (>= 2)
Authors
Jim Albert
Initial release
2018-03-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.