double hyperp(int x, int n, int N, int M);
Returns the probability from the Hypergeometric random variable distribution function with a population size M, containing N successes, with a sample of size n, and observing x or less successes.
Parameters:
x | Critical point. |
---|---|
n | Sample size. |
N | Number of successes in population. |
M | Population size. |
Returns:
P(X ≤ x | n, N, M)
Errors:
NUM_ERRROR
is raised if n > M, N > M, or n > N
Usage:
double p = hyperp(5, 10, 20, 30)
Header:
#include "discdist.h"