jhplot.math.num.pdf
Class DiscreteDistribution
- java.lang.Object
-
- jhplot.math.num.pdf.DiscreteDistribution
-
- All Implemented Interfaces:
- Distribution
- Direct Known Subclasses:
- Binomial, Geometric, Hypergeometric, NegativeBinomial, Poisson
public abstract class DiscreteDistribution extends java.lang.Object implements Distribution
Base discrete distribution.- Since:
- 1.2
-
-
Constructor Summary
Constructors Constructor and Description DiscreteDistribution()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description abstract double
cumulativeProbability(int x)
The CDF for this distribution.abstract int
inverseCumulativeProbability(double p)
The inverse CDF for this distribution.abstract double
probability(int x)
The PMF for this distribution.
-
-
-
Method Detail
-
cumulativeProbability
public abstract double cumulativeProbability(int x) throws NumericException
The CDF for this distribution. This method returns P(X ≤ x).- Parameters:
x
- the value at which the CDF is evaluated.- Returns:
- CDF for this distribution.
- Throws:
NumericException
- if the cumulative probability can not be computed.
-
inverseCumulativeProbability
public abstract int inverseCumulativeProbability(double p) throws NumericException
The inverse CDF for this distribution. This method returns the largest x such that, P(X ≤ x) ≤ p.- Parameters:
p
- the cumulative probability.- Returns:
- x
- Throws:
NumericException
- if the inverse cumulative probability can not be computed.
-
probability
public abstract double probability(int x) throws NumericException
The PMF for this distribution. This method returns P(X = x).- Parameters:
x
- the value at which the probability is evaluated.- Returns:
- PMF for this distribution.
- Throws:
NumericException
- if the probability can not be computed.
-
-
DMelt 3.0 © DataMelt by jWork.ORG