Evaluates the binomial distribution probability density function.
Controller: CodeCogs
Contents
Interface
C++
Excel
doublePDF( | double | p | |
int | s | ||
int | n | ) |
References:
MathWorld, http://mathworld.wolfram.com/BinomialDistribution.htmlExample 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
p is the probability of success on any one trial s is the number of successes n is 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.