Recover Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttp://yahoo.com/
get GPL
COST (GBP)
this unit 2.81
sub units 0.00
add licence
0

PDF

Evaluates the binomial distribution probability density function.
Controller: CodeCogs

buy now get GPL add to cart

Interface

C++
Excel
HTML

PDF

 
doublePDFdoublep
ints
intn )
The binomial distribution gives the discrete probability distribution of obtaining exactly s successes out of n Bernoulli trials (where the result of each Bernoulli trial is true with probability p and false with probability <em>1-p</em>). The binomial distribution is therefore given by:

References:

MathWorld, http://mathworld.wolfram.com/BinomialDistribution.html

Example 1

#include<iostream>
#include<codecogs/stats/dists/discrete/binomial/pdf.h>
int main()
{
  std::cout << "binomial PDF: " << Stats::Dists::Discrete::Binomial::PDF(0.3,5,2) << std::endl;
  return 0;
}
Output:
binomial PDF: 0.00708455

Parameters

pis the probability of success on any one trial
sis the number of successes
nis the number of events

Authors

Anca Filibiu (September 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.


 

Page Comments

falcao\′s Photo
5 Sep 10, 4:10AM
In the for cycle it looks like a division by 0 when i = 0.
 
 Format Excel Equations

  You must login to leave a messge