expected_loss: Calculate the expected loss from assuming the wrong beta

Description Usage Arguments

Description

Find the expected loss from two Beta posteriors if one assumes (wrongly) that a / b > c / d. That is, E[max(Beta(c, d) - Beta(a, b), 0)]. 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

1
expected_loss(a, b, c, d, approx = 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 when calculating h

...

Extra arguments, ignored


dgrtwo/splittestr documentation built on May 15, 2019, 8:19 a.m.