Interface ProbabilityMassFunction<X>

  • Type Parameters:
    X - the discrete random variable (domain) type
    All Superinterfaces:
    Iterable<ProbabilityMassFunction.Mass<X>>

    public interface ProbabilityMassFunction<X>
    extends Iterable<ProbabilityMassFunction.Mass<X>>
    A probability mass function (pmf) is a function that gives the probability that a discrete random variable is exactly equal to some value. Suppose that X: S → R is a discrete random variable defined on a sample space S. The probability mass function fX: R → [0, 1] for X is defined as
    fX(x) = Pr(X = x) = Pr({s ∈ S : X(s) = x})
    See Also:
    Wikipedia: Probability mass function
    • Method Detail

      • evaluate

        double evaluate​(X x)
        Compute the probability mass for a discrete realization x.
        Parameters:
        x - a realization
        Returns:
        pmf(x)