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 asfX(x) = Pr(X = x) = Pr({s ∈ S : X(s) = x})
- See Also:
- Wikipedia: Probability mass function
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ProbabilityMassFunction.Mass<X>
Stores a possible outcome for a probability distribution and its associated probability.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
evaluate(X x)
Compute the probability mass for a discrete realization x.-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
Method Detail
-
evaluate
double evaluate(X x)
Compute the probability mass for a discrete realization x.- Parameters:
x
- a realization- Returns:
pmf(x)
-
-