The HypergeometricDistribution defines

/** returns {@code P(X >= x)} */
public double upperCumulativeProbability(int x)

This was present in Commons Math 3 and so was ported to the new stats
project.

We now have for all distributions:

/** returns {@code P(X > x)} */
double survivalProbability(int x)

I suggest removing the upperCumulativeProbability method from
the HypergeometricDistribution. It computes a different value (as it
includes the input value x) but it is largely redundant due to the survival
probability function. It value can be replicated using:

HypergeometricDistribution d;
int x;
double p = d.survivalProbability(x) + d.probability(x);

I am not aware of an explicit use for this upper cumulative probability
function.

Alex

Reply via email to