The OpenD Programming Language

betaPDF

Computes the beta probability density function (PDF).

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

Parameters

x T

value to evaluate PDF

alpha T

shape parameter #1

beta T

shape parameter #2

Examples

import mir.math.common: approxEqual;

assert(0.5.betaPDF(1, 1) == 1);
assert(0.75.betaPDF(1, 2).approxEqual(0.5));
assert(0.25.betaPDF(0.5, 4).approxEqual(0.9228516));

See Also

Meta