🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@stdlib/stats-base-dists-binomial

Package Overview
Dependencies
Maintainers
4
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stdlib/stats-base-dists-binomial

Binomial distribution.

Source
npmnpm
Version
0.0.6
Version published
Weekly downloads
114
2.7%
Maintainers
4
Weekly downloads
 
Created
Source

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 © 2016-2022. The Stdlib Authors.

Keywords

stdlib

FAQs

Package last updated on 16 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts