Package smile.stat.distribution
Interface Distribution
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
AbstractDistribution,GaussianDistribution,Mixture
public interface Distribution extends java.io.SerializableProbability distribution of univariate random variable. A probability distribution identifies either the probability of each value of a random variable (when the variable is discrete), or the probability of the value falling within a particular interval (when the variable is continuous). When the random variable takes values in the set of real numbers, the probability distribution is completely described by the cumulative distribution function, whose value at each real x is the probability that the random variable is smaller than or equal to x.- Author:
- Haifeng Li
- See Also:
MultivariateDistribution
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description doublecdf(double x)Cumulative distribution function.doubleentropy()Shannon entropy of the distribution.doublelikelihood(double[] x)The likelihood of the sample set following this distribution.doublelogLikelihood(double[] x)The log likelihood of the sample set following this distribution.doublelogp(double x)The density at x in log scale, which may prevents the underflow problem.doublemean()The mean of distribution.intnpara()The number of parameters of the distribution.doublep(double x)The probability density function for continuous distribution or probability mass function for discrete distribution at x.doublequantile(double p)The quantile, the probability to the left of quantile is p.doublerand()Generates a random number following this distribution.doublesd()The standard deviation of distribution.doublevar()The variance of distribution.
-
-
-
Method Detail
-
npara
int npara()
The number of parameters of the distribution.
-
mean
double mean()
The mean of distribution.
-
var
double var()
The variance of distribution.
-
sd
double sd()
The standard deviation of distribution.
-
entropy
double entropy()
Shannon entropy of the distribution.
-
rand
double rand()
Generates a random number following this distribution.
-
p
double p(double x)
The probability density function for continuous distribution or probability mass function for discrete distribution at x.
-
logp
double logp(double x)
The density at x in log scale, which may prevents the underflow problem.
-
cdf
double cdf(double x)
Cumulative distribution function. That is the probability to the left of x.
-
quantile
double quantile(double p)
The quantile, the probability to the left of quantile is p. It is actually the inverse of cdf.
-
likelihood
double likelihood(double[] x)
The likelihood of the sample set following this distribution.
-
logLikelihood
double logLikelihood(double[] x)
The log likelihood of the sample set following this distribution.
-
-