#include <negativebinomial.h>

Public Member Functions | |
| negative_binomial_distribution (int r=1, double p=0.5) | |
| double | cdf (int x) const |
| int | inverse_cdf (double p) const |
| double | pmf (int x) const |
| int | number_of_successes () const |
| void | number_of_successes (int n) |
| double | probability_of_success () const |
| void | probability_of_success (double p) |
References:
| NUM_NAMESPACE_BEGIN negative_binomial_distribution::negative_binomial_distribution | ( | int | n = 1, |
|
| double | p = 0.5 | |||
| ) |
Create a distribution with the given number of successes and probability of success.
| r | the number of successes. | |
| p | the probability of success. |
| n | the number of successes. | |
| p | the probability of success. |
| double negative_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 negative_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 negative_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 negative_binomial_distribution::number_of_successes | ( | ) | const |
Access the number of successes.
| void negative_binomial_distribution::number_of_successes | ( | int | n | ) |
Modify the number of successes.
| n | the new number of successes. |
| df | the new number of successes. |
| double negative_binomial_distribution::probability_of_success | ( | ) | const |
Access the probability of success.
| void negative_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