double geomv(double pp, double p, int *x0, int *x1);
Returns two critical points of the Geometric random variable distribution function with probability of success p such that P(X ≤ x0) ≤ pp ≤ P(X ≤ x1).
Parameters:
pp | Cummulative probability. |
---|---|
p | Probability of success. |
x0 | Lower bound critical point. |
x1 | Upper bound critical point. |
Returns:
On exit, x0 and x1 are set such thate P(X ≤ x0 | p) ≤ pp ≤ P(X ≤ x1 | p)
Errors:
NUM_ERRROR
is raise if p ≤ 0, p ≥ 1, pp ≤ 0, or pp ≥ 1
Usage:
int x0, x1;
geomv(0.5, 0.75, &x0, &x1)
Header:
#include "discdist.h"