smile.stat.distribution

## Interface Distribution

• ### Method Summary

All Methods
Modifier and Type Method and Description
`double` `cdf(double x)`
Cumulative distribution function.
`double` `entropy()`
Shannon entropy of the distribution.
`int` `length()`
The number of parameters of the distribution.
`default double` `likelihood(double[] x)`
The likelihood of the sample set following this distribution.
`default double` `logLikelihood(double[] x)`
The log likelihood of the sample set following this distribution.
`double` `logp(double x)`
The density at x in log scale, which may prevents the underflow problem.
`double` `mean()`
The mean of distribution.
`double` `p(double x)`
The probability density function for continuous distribution or probability mass function for discrete distribution at x.
`double` `quantile(double p)`
The quantile, the probability to the left of quantile is p.
`double` `rand()`
Generates a random number following this distribution.
`default double[]` `rand(int n)`
Generates a set of random numbers following this distribution.
`default double` `sd()`
The standard deviation of distribution.
`double` `variance()`
The variance of distribution.
• ### Method Detail

• #### length

`int length()`
The number of parameters of the distribution. The "length" is in the sense of the minimum description length principle.
• #### mean

`double mean()`
The mean of distribution.
• #### variance

`double variance()`
The variance of distribution.
• #### sd

`default 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.
• #### rand

`default double[] rand(int n)`
Generates a set of random numbers 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

`default double likelihood(double[] x)`
The likelihood of the sample set following this distribution.
• #### logLikelihood

`default double logLikelihood(double[] x)`
The log likelihood of the sample set following this distribution.