public abstract class DiscreteDistribution extends AbstractDistribution
| Constructor and Description |
|---|
DiscreteDistribution() |
| Modifier and Type | Method and Description |
|---|---|
double |
likelihood(int[] x)
The likelihood given a sample set following the distribution.
|
double |
logLikelihood(int[] x)
The likelihood given a sample set following the distribution.
|
double |
logp(double x)
The density at x in log scale, which may prevents the underflow problem.
|
abstract double |
logp(int x)
The probability mass function in log scale.
|
double |
p(double x)
The probability density function for continuous distribution
or probability mass function for discrete distribution at x.
|
abstract double |
p(int x)
The probability mass function.
|
protected double |
quantile(double p,
int xmin,
int xmax)
Invertion of cdf by bisection numeric root finding of "cdf(x) = p"
for discrete distribution.* Returns integer n such that
P( |
inverseTransformSampling, likelihood, logLikelihood, quantile, quantile, rejectionpublic abstract double p(int x)
public double p(double x)
Distributionpublic abstract double logp(int x)
public double logp(double x)
Distributionpublic double likelihood(int[] x)
public double logLikelihood(int[] x)
protected double quantile(double p,
int xmin,
int xmax)