Interface DiscreteInverseCumulativeProbabilityFunction
public interface DiscreteInverseCumulativeProbabilityFunction
Interface for a discrete distribution that can be sampled using
the
inversion method.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionint
inverseCumulativeProbability
(double p) Computes the quantile function of the distribution.
-
Method Details
-
inverseCumulativeProbability
int inverseCumulativeProbability(double p) Computes the quantile function of the distribution. For a random variableX
distributed according to this distribution, the returned value is- \( \inf_{x \in \mathcal{Z}} P(X \le x) \ge p \) for \( 0 \lt p \le 1 \)
- \( \inf_{x \in \mathcal{Z}} P(X \le x) \gt 0 \) for \( p = 0 \)
- Parameters:
p
- Cumulative probability.- Returns:
- the smallest
p
-quantile of the distribution (largest 0-quantile forp = 0
). - Throws:
IllegalArgumentException
- ifp < 0
orp > 1
.
-