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 2.81
sub units 0.00
+
0

PDF

Evaluates the binomial distribution probability density function.
Controller: CodeCogs

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.