Learn R Programming

TeachBayes (version 0.1.0)

two_p_update: Posterior updating of two proportions

Description

Computes posterior distribution of two proportions with a discrete prior

Usage

two_p_update(prior, y1n1, y2n2)

Arguments

prior
prior probability matrix where the rows and columns are labeled with the values of the proportions
y1n1
number of successes and sample size from first sample
y2n2
number of successes and sample size from second sample

Value

posterior probability matrix

Examples

Run this code
  prior <- testing_prior()
  two_p_update(prior, c(3, 10), c(8, 20))

Run the code above in your browser using DataLab