template class xf::fintech::BinomialDistribution¶
#include "binomial_distribution.hpp"
Overview¶
BinomialDistribution binomial distribution.
Parameters:
DT | data type supported include float and double |
template <typename DT> class BinomialDistribution
Methods¶
init¶
void init ( unsigned int n_, DT p_ )
init initialize parameters
Parameters:
n_ | n independent Bernoulli trials |
p_ | p is the probability of success of a single trial. |
PMF¶
DT PMF (int k)
PMF it implement a probability mass function for binomial distribution.
Parameters:
k | k successes in n independent Bernoulli trials |
CDF¶
DT CDF (unsigned int k)
CDF it implement a cumulative distribution function for binomial distribution.
Parameters:
k | k successes in n independent Bernoulli trials |
Returns:
it belong to [0, 1] and also is a cumulative probability value.