PHP Class MathPHP\Probability\Distribution\Discrete\Pascal

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

Public Methods

Method Description
PMF ( integer $x, integer $r, float $P ) : float Pascal distribution (convenience method for negative binomial distribution) Probability mass function https://en.wikipedia.org/wiki/Negative_binomial_distribution

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