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