The OpenD Programming Language

betaProportionLPDF

Computes the beta proportion log probability density function (LPDF).

@safe pure nothrow @nogc
T
betaProportionLPDF
(
T
)
(
const T x
,
const T mu
,
const T kappa
)
if (
isFloatingPoint!T
)

Parameters

x T

value to evaluate LPDF

mu T

shape parameter #1

kappa T

shape parameter #2

Examples

import mir.math.common: approxEqual, log;

assert(0.5.betaProportionLPDF(0.5, 2).approxEqual(log(betaProportionPDF(0.5, 0.5, 2))));
assert(0.75.betaProportionLPDF((1.0 / 3), 3).approxEqual(log(betaProportionPDF(0.75, (1.0 / 3), 3))));
assert(0.25.betaProportionLPDF((1.0 / 9), 4.5).approxEqual(log(betaProportionPDF(0.25, (1.0 / 9), 4.5))));

See Also

Beta Proportion Distribution, $(DISTREF beta, betaLPDF)

Meta