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

triplot

Plot of prior, likelihood and posterior for a proportion


Description

For a proportion problem with a beta prior, plots the prior, likelihood and posterior on one graph.

Usage

triplot(prior,data,where="topright")

Arguments

prior

vector of parameters for beta prior

data

vector consisting of number of successes and number of failures

where

the location of the legend for the plot

Author(s)

Jim Albert

Examples

prior=c(3,10)  # proportion has a beta(3, 10) prior
data=c(10,6)   # observe 10 successes and 6 failures
triplot(prior,data)

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.