I have forgotten

• https://me.yahoo.com
COST (GBP)
0.28
5.72
0

# PDF

Calculates the negative binomial distribution PDF.
Controller: CodeCogs
Contents

C++
Excel

## PDF

 doublePDF( int x int r double p )
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

 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.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.5346413850784302, "perplexity": 13799.849774140534}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 5, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2018-51/segments/1544376824822.41/warc/CC-MAIN-20181213123823-20181213145323-00191.warc.gz"}