The OpenD Programming Language

paretoLPDF

Computes the pareto log probability density function (LPDF).

@safe pure nothrow @nogc
T
paretoLPDF
(
T
)
(
const T x
,
const T xMin
,
const T alpha
)
if (
isFloatingPoint!T
)

Parameters

x T

value to evaluate LPDF

xMin T

scale parameter

alpha T

shape parameter

Examples

import mir.math.common: log;
import mir.test: shouldApprox;

1.0.paretoLPDF(1, 3).shouldApprox == log(paretoPDF(1.0, 1, 3));
2.0.paretoLPDF(1, 3).shouldApprox == log(paretoPDF(2.0, 1, 3));
3.0.paretoLPDF(2, 4).shouldApprox == log(paretoPDF(3.0, 2, 4));

See Also

Meta