The OpenD Programming Language

logNormalLPDF

Ditto, with location and scale parameters (by standardizing x).

  1. T logNormalLPDF(T x)
  2. T logNormalLPDF(T x, T mean, T stdDev)
    @safe pure nothrow @nogc
    T
    logNormalLPDF
    (
    T
    )
    (
    const T x
    ,
    const T mean
    ,
    const T stdDev
    )
    if (
    isFloatingPoint!T
    )

Parameters

x T

value to evaluate LPDF

mean T

location parameter

stdDev T

scale parameter

Examples

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

logNormalLPDF(1.0).shouldApprox == log(0.3989423);
logNormalLPDF(2.0).shouldApprox == log(0.156874);
logNormalLPDF(3.0).shouldApprox == log(0.07272826);

// Can include location/scale
logNormalLPDF(1.0, 1, 2).shouldApprox == log(0.1760327);
logNormalLPDF(2.0, 1, 2).shouldApprox == log(0.09856858);
logNormalLPDF(3.0, 1, 2).shouldApprox == log(0.06640961);

Meta