I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
get GPL
COST (GBP)
this unit 0.28
sub units 5.72
+
0

PDF

Calculates the negative binomial distribution PDF.
Controller: CodeCogs

Dependents

Info

Interface

C++
Excel

PDF

 
doublePDFintx
intr
doublep )
The negative binomial distribution, also known as the Pascal distribution or Polya distribution, gives the probability of <em>r -1</em> successes and x failures in <em>x+r - 1</em> trials, and success on the <em>(x+r)</em> trial. The probability density is given by

where:

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

xthe number of failures
rthe threshold number of successes
pthe 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.