The OpenD Programming Language

betaLPDF

Computes the beta log probability density function (LPDF).

@safe pure nothrow @nogc
T
betaLPDF
(
T
)
(
const T x
,
const T alpha
,
const T beta
)
if (
isFloatingPoint!T
)

Parameters

x T

value to evaluate LPDF

alpha T

shape parameter #1

beta T

shape parameter #2

Examples

import mir.math.common: approxEqual, log;

assert(0.5.betaLPDF(1, 1).approxEqual(log(betaPDF(0.5, 1, 1))));
assert(0.75.betaLPDF(1, 2).approxEqual(log(betaPDF(0.75, 1, 2))));
assert(0.25.betaLPDF(0.5, 4).approxEqual(log(betaPDF(0.25, 0.5, 4))));

See Also

Meta