The OpenD Programming Language

logNormalPDF

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

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

Parameters

x T

value to evaluate PDF

mean T

location parameter

stdDev T

scale parameter

Examples

import mir.test: shouldApprox;

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

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

Meta