PHP Class MathPHP\Probability\Distribution\Discrete\Binomial

Inheritance: extends Discrete
Mostrar archivo Open project: markrogoyski/math-php

Public Methods

Method Description
CDF ( integer $n, integer $r, float $p ) : float Binomial distribution - cumulative distribution function Computes and sums the binomial distribution at each of the values in r.
PMF ( integer $n, integer $r, float $p ) : float Binomial distribution - probability mass function https://en.wikipedia.org/wiki/Binomial_distribution

Method Details

CDF() public static method

Binomial distribution - cumulative distribution function Computes and sums the binomial distribution at each of the values in r.
public static CDF ( integer $n, integer $r, float $p ) : float
$n integer number of events
$r integer number of successful events
$p float
return float

PMF() public static method

P(X = r) = nCr pʳ (1 - p)ⁿ⁻ʳ
public static PMF ( integer $n, integer $r, float $p ) : float
$n integer number of events
$r integer number of successful events
$p float probability of success
return float