Calculates the negative binomial distribution PDF.
Controller: CodeCogs
Contents
Dependents
Interface
C++
Excel
doublePDF( | int | x | |
int | r | ||
double | p | ) |
Example 1
#include <iostream> #include <codecogs/stats/dists/discrete/negativebinomial/pdf.h> using namespace Stats::Dists::Discrete::NegativeBinomial; int main() { std::cout << "\n PDF(10,5,0.25) = " << PDF(10, 5, 0.25); return 0; }
Output:PDF(10,5,0.25) = 0.0550487
Parameters
x the number of failures r the threshold number of successes p the probability of success in each trial
Authors
- Eugene Dolinskyy
Updated by Will Bateman (August 2005)
Source Code
Source code is available when you agree to a GP Licence or buy a Commercial Licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.