Learn R Programming

grizbayr (version 1.3.5)

update_beta: Update Beta

Description

Updates Beta Distribution with the Beta-Bernoulli conjugate prior update rule

Usage

update_beta(alpha, beta, priors = list())

Value

A tibble object that contains `alpha` and `beta`

Arguments

alpha

Double value for alpha (count of successes). Must be 0 or greater.

beta

Double value for beta (count of failures). Must be 0 or greater.

priors

An optional list object that contains alpha0 and beta0. Otherwise the function with use Beta(1,1) as the prior distribution.

Examples

Run this code
update_beta(alpha = 1, beta = 5, priors = list(alpha0 = 2, beta0 = 2))
update_beta(alpha = 20000, beta = 50000)

Run the code above in your browser using DataLab