Interface DiscreteInverseCumulativeProbabilityFunction

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface DiscreteInverseCumulativeProbabilityFunction
    Interface for a discrete distribution that can be sampled using the inversion method.
    Since:
    1.0
    • Method Detail

      • inverseCumulativeProbability

        int inverseCumulativeProbability​(double p)
        Computes the quantile function of the distribution. For a random variable X 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 for p = 0).
        Throws:
        java.lang.IllegalArgumentException - if p < 0 or p > 1.