/binomial-pmf

Binomial probability mass function

Primary LanguageJavaScriptMIT LicenseMIT

binomial-pmf

Binomial probability mass function.

Example

const pmf = require('binomial-pmf');

pmf(2, 3, 0.7);
// => 0.441

Installation

$ npm install binomial-pmf

API

const pmf = require('binomial-pmf');

pmf(k, n, p)

Returns the probability of getting exactly Number k successes in Number n trials given that the probability of a success is Number p.