time-to-botec/squiggle/node_modules/@stdlib/stats/base/dists/exponential/README.md
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

7.3 KiB

Exponential

Exponential distribution.

Usage

var exponential = require( '@stdlib/stats/base/dists/exponential' );

exponential

Exponential distribution.

var dist = exponential;
// returns {...}

The namespace contains the following distribution functions:

  • cdf( x, lambda ): exponential distribution cumulative distribution function.
  • logcdf( x, lambda ): evaluate the natural logarithm of the cumulative distribution function for an exponential distribution.
  • logpdf( x, lambda ): evaluate the natural logarithm of the probability density function (PDF) for an exponential distribution.
  • mgf( t, lambda ): exponential distribution moment-generating function (MGF).
  • pdf( x, lambda ): exponential distribution probability density function (PDF).
  • quantile( p, lambda ): exponential distribution quantile function.

The namespace contains the following functions for calculating distribution properties:

The namespace contains a constructor function for creating an exponential distribution object.

var Exponential = require( '@stdlib/stats/base/dists/exponential' ).Exponential;

var dist = new Exponential( 2.0 );

var y = dist.logpdf( 0.8 );
// returns ~-0.907

Examples

var objectKeys = require( '@stdlib/utils/keys' );
var exponential = require( '@stdlib/stats/base/dists/exponential' );

console.log( objectKeys( exponential ) );