two_p_update: Posterior updating of two proportions

Description Usage Arguments Value Author(s) Examples

View source: R/two_p_update.R

Description

Computes posterior distribution of two proportions with a discrete prior

Usage

1
  two_p_update(prior, s1f1, s2f2)

Arguments

prior

prior probability matrix where the rows and columns are labeled with the values of the proportions

s1f1

number of successes and number of failures from first sample

s2f2

number of successes and number of failures from second sample

Value

posterior probability matrix

Author(s)

Jim Albert

Examples

1
2
3
4
  prior <- testing_prior()
  first_sample <- c(3, 10)
  second_sample <- c(8, 20)
  two_p_update(prior, first_sample, second_sample)

bayesball/TeachBayes documentation built on Jan. 5, 2020, 1:47 a.m.