h: Calculate the probability one random beta variable is greater...

View source: R/math-functions.R

hR Documentation

Calculate the probability one random beta variable is greater than another

Description

Find the probability that Beta(a, b) > Beta(c, d). This comes from https://www.chrisstucchio.com/blog/2014/bayesian_ab_decision_rule.html. Note that the approx = TRUE version is vectorized, but the exact version is not.

Usage

h(a, b, c, d, approx = FALSE, log_h = FALSE)

Arguments

a

alpha parameter for first Beta

b

beta parameter for second Beta

c

alpha parameter for first Beta

d

beta parameter for second Beta

approx

whether to use a normal approximation to the beta

log_h

whether to return log(h(a, b, c, d)) rather than h(a, b, c, d)


dgrtwo/splittestr documentation built on May 15, 2022, 3:16 p.m.