Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface for the cumulative distribution function (CDF) of a lognormal distribution.

Hierarchy

  • CDF

Callable

  • __call(x: number, mu: number, sigma: number): number
  • Evaluates the cumulative distribution function (CDF) for a lognormal distribution with location parameter mu and scale parameter sigma at a value x.

    Notes

    • If provided sigma <= 0, the function returns NaN.

    Parameters

    • x: number

      input value

    • mu: number

      location parameter

    • sigma: number

      scale parameter

    Returns number

    evaluated CDF

    Example

    var y = cdf( 2.0, 0.0, 1.0 );
    // returns ~0.756

    Example

    var y = cdf( 5.0, 10.0, 3.0 );
    // returns ~0.003

    Example

    var y = cdf( 2.0, 0.0, NaN );
    // returns NaN

    Example

    var y = cdf( 2.0, NaN, 1.0 );
    // returns NaN

    Example

    var y = cdf( NaN, 0.0, 1.0 );
    // returns NaN

Index

Methods

Methods

factory

  • factory(mu: number, sigma: number): Unary
  • Returns a function for evaluating the cumulative distribution function (CDF) for a lognormal distribution with location parameter mu and scale parameter sigma.

    Parameters

    • mu: number

      location parameter

    • sigma: number

      scale parameter

    Returns Unary

    CDF

    Example

    var mycdf = cdf.factory( 3.0, 1.5 );
    
    var y = mycdf( 1.0 );
    // returns ~0.023
    
    y = mycdf( 4.0 );
    // returns ~0.141