PHP Class MathPHP\Probability\Distribution\Discrete\NegativeBinomial

Inheritance: extends Discrete
Show file Open project: markrogoyski/math-php

Public Methods

Method Description
PMF ( integer $x, integer $r, float $p ) : float Probability mass function

Method Details

PMF() public static method

b(x; r, p) = ₓ₋₁Cᵣ₋₁ pʳ * (1 - p)ˣ⁻ʳ
public static PMF ( integer $x, integer $r, float $p ) : float
$x integer number of trials required to produce r successes
$r integer number of successful events
$p float probability of success on an individual trial
return float