@stdlib/stats-base-dists-bradford
v0.1.1
Published
Bradford distribution.
Readme
Bradford
Bradford distribution.
Installation
npm install @stdlib/stats-base-dists-bradfordUsage
var bradford = require( '@stdlib/stats-base-dists-bradford' );bradford
Bradford distribution.
var dist = bradford;
// returns {...}The namespace contains the following distribution functions:
cdf( x, c ): bradford distribution cumulative distribution function (CDF).pdf( x, c ): bradford distribution probability density function (PDF).quantile( p, c ): bradford distribution quantile function.
The namespace contains the following functions for calculating distribution properties:
entropy( c ): bradford distribution differential entropy.mean( c ): bradford distribution expected value.median( c ): bradford distribution median.mode( c ): bradford distribution mode.skewness( c ): bradford distribution skewness.stdev( c ): bradford distribution standard deviation.variance( c ): bradford distribution variance.
Examples
var bradford = require( '@stdlib/stats-base-dists-bradford' );
/*
* The Bradford distribution is defined over [0,1] with shape parameter c.
*/
var c = 2.0;
// Compute the mean:
var mu = bradford.mean( c );
// returns ~0.410
// Compute the median:
var median = bradford.median( c );
// returns ~0.366
// Compute the variance:
var s2 = bradford.variance( c );
// returns ~0.082
// Compute the standard deviation:
var sigma = bradford.stdev( c );
// returns ~0.286
// Evaluate the PDF at x = 0.5:
var y = bradford.pdf( 0.5, c );
// returns ~0.910
// Evaluate the CDF at x = 0.5:
var p = bradford.cdf( 0.5, c );
// returns ~0.631
// Compute the 50th percentile (median):
var q = bradford.quantile( 0.5, c );
// returns ~0.366
// Compute the entropy:
var h = bradford.entropy( c );
// returns ~-0.050
// Compute the skewness:
var skew = bradford.skewness( c );
// returns ~0.378
// Compute the mode:
var mode = bradford.mode( c );
// returns 0.0Notice
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-2026. The Stdlib Authors.
