@stdlib/stats-base-dists-binomial
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.7 • Public • Published

    Binomial

    NPM version Build Status Coverage Status

    Binomial distribution.

    Installation

    npm install @stdlib/stats-base-dists-binomial

    Usage

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

    binomial

    Binomial distribution.

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

    The namespace contains the following distribution functions:

    • cdf( x, n, p ): binomial distribution cumulative distribution function.
    • logpmf( x, n, p ): evaluate the natural logarithm of the probability mass function (PMF) for a binomial distribution.
    • mgf( t, n, p ): binomial distribution moment-generating function (MGF).
    • pmf( x, n, p ): binomial distribution probability mass function (PMF).
    • quantile( r, n, p ): binomial distribution quantile function.

    The namespace contains the following functions for calculating distribution properties:

    The namespace contains a constructor function for creating a binomial distribution object.

    var Binomial = require( '@stdlib/stats-base-dists-binomial' ).Binomial;
    var dist = new Binomial( 10, 0.4 );
    
    var mu = dist.mean;
    // returns 4

    Examples

    var objectKeys = require( '@stdlib/utils-keys' );
    var binomial = require( '@stdlib/stats-base-dists-binomial' );
    
    console.log( objectKeys( binomial ) );

    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

    Chat


    License

    See LICENSE.

    Copyright

    Copyright © 2016-2022. The Stdlib Authors.

    Install

    npm i @stdlib/stats-base-dists-binomial

    Homepage

    stdlib.io

    DownloadsWeekly Downloads

    50

    Version

    0.0.7

    License

    Apache-2.0

    Unpacked Size

    39.3 kB

    Total Files

    7

    Last publish

    Collaborators

    • stdlib-bot
    • kgryte
    • planeshifter
    • rreusser