The OpenD Programming Language

geometricPMF

Computes the geometric probability density function (PMF).

@safe pure @nogc nothrow
T
geometricPMF
(
T
)
(
const size_t k
,
const T p
)
if (
isFloatingPoint!T
)

Parameters

k size_t

value to evaluate PMF

p T

true probability

Examples

import mir.test: shouldApprox;

0.geometricPMF(0.5).shouldApprox == 0.5;
1.geometricPMF(0.5).shouldApprox == 0.25;
2.geometricPMF(0.25).shouldApprox == 0.140625;

See Also

Meta