0.2.1 • Published 3 months ago
@stdlib/stats-base-dists-normal v0.2.1
Normal
Normal distribution.
Installation
npm install @stdlib/stats-base-dists-normal
Usage
var normal = require( '@stdlib/stats-base-dists-normal' );
normal
Normal distribution.
var dist = normal;
// returns {...}
The namespace contains the following distribution functions:
cdf( x, mu, sigma )
: normal distribution cumulative distribution function.logcdf( x, mu, sigma )
: evaluate the natural logarithm of the cumulative distribution function (CDF) for a normal distribution.logpdf( x, mu, sigma )
: evaluate the natural logarithm of the probability density function (PDF) for a normal distribution.mgf( t, mu, sigma )
: normal distribution moment-generating function (MGF).pdf( x, mu, sigma )
: normal distribution probability density function (PDF).quantile( p, mu, sigma )
: normal distribution quantile function.
The namespace contains the following functions for calculating distribution properties:
entropy( mu, sigma )
: normal distribution differential entropy.kurtosis( mu, sigma )
: normal distribution excess kurtosis.mean( mu, sigma )
: normal distribution expected value.median( mu, sigma )
: normal distribution median.mode( mu, sigma )
: normal distribution mode.skewness( mu, sigma )
: normal distribution skewness.stdev( mu, sigma )
: normal distribution standard deviation.variance( mu, sigma )
: normal distribution variance.
The namespace contains a constructor function for creating a normal distribution object.
Normal( [mu, sigma] )
: normal distribution constructor.
var Normal = require( '@stdlib/stats-base-dists-normal' ).Normal;
var dist = new Normal( 2.0, 4.0 );
var y = dist.pdf( 2.0 );
// returns ~0.1
Examples
var objectKeys = require( '@stdlib/utils-keys' );
var normal = require( '@stdlib/stats-base-dists-normal' );
console.log( objectKeys( normal ) );
Notice
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
Community
License
See LICENSE.
Copyright
Copyright © 2016-2024. The Stdlib Authors.