The OpenD Programming Language

logNormalCDF

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

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

Parameters

x T

value to evaluate CDF

mean T

location parameter

stdDev T

scale parameter

Examples

import mir.test: shouldApprox;

logNormalCDF(0.0).shouldApprox == 0;
logNormalCDF(1.0).shouldApprox == 0.5;
logNormalCDF(2.0).shouldApprox == 0.7558914;
logNormalCDF(3.0).shouldApprox == 0.8640314;

// Can include location/scale
logNormalCDF(0.0, 1, 2).shouldApprox == 0;
logNormalCDF(1.0, 1, 2).shouldApprox == 0.3085375;
logNormalCDF(2.0, 1, 2).shouldApprox == 0.439031;
logNormalCDF(3.0, 1, 2).shouldApprox == 0.5196623;

Meta