#include <binomial.h>

Public Member Functions | |
| binomial_distribution (int n=1, double p=0.5) | |
| double | cdf (int x) const |
| int | inverse_cdf (double p) const |
| double | pmf (int x) const |
| int | number_of_trials () const |
| void | number_of_trials (int n) |
| double | probability_of_success () const |
| void | probability_of_success (double p) |
References:
| NUM_NAMESPACE_BEGIN binomial_distribution::binomial_distribution | ( | int | n = 1, |
|
| double | p = 0.5 | |||
| ) |
Create a distribution with the given number of trials and probability of success.
| n | the number of trials. | |
| p | the probability of success. |
| double binomial_distribution::cdf | ( | int | x | ) | const [virtual] |
The CDF for this distribution. This method returns P(X x).
| x | the value at which the CDF is evaluated. |
Implements discrete_distribution.
| int binomial_distribution::inverse_cdf | ( | double | p | ) | const [virtual] |
The inverse CDF for this distribution. This method returns the largest x such that, P(X x) p.
| p | the cumulative probability. |
| p | the cumulative probability. |
Implements discrete_distribution.
| double binomial_distribution::pmf | ( | int | x | ) | const [virtual] |
The PMF for this distribution. This method returns P(X = x).
| x | the value at which the PMF is evaluated. |
Implements discrete_distribution.
| int binomial_distribution::number_of_trials | ( | ) | const |
Access the number of trials.
| void binomial_distribution::number_of_trials | ( | int | n | ) |
Modify the number of trials.
| n | the new number of trials. |
| df | the new number of trials. |
| double binomial_distribution::probability_of_success | ( | ) | const |
Access the probability of success.
| void binomial_distribution::probability_of_success | ( | double | p | ) |
Modify the probability of success.
| p | the new probability of success. |
| df | the new probability of success. |
1.5.3