public class LogisticDistribution extends AbstractDistribution
The cumulative distribution function of the logistic distribution is given by:
1
F(x; μ,s) = -------------
1 + e-(x-μ)/s
The probability density function of the logistic distribution is given by:
e-(x-μ)/s
f(x; μ,s) = -----------------
s(1 + e-(x-μ)/s)2
The logistic distribution and the S-shaped pattern that results from it have been extensively used in many different areas such as:
| Modifier and Type | Field and Description |
|---|---|
double |
mu
The location parameter.
|
double |
scale
The scale parameter.
|
| Constructor and Description |
|---|
LogisticDistribution(double mu,
double scale)
Constructor.
|
| 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.
|
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.
|
double |
sd()
The standard deviation of distribution.
|
java.lang.String |
toString() |
double |
variance()
The variance of distribution.
|
inverseTransformSampling, quantile, quantile, rejectionclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitlikelihood, logLikelihood, randpublic final double mu
public final double scale
public LogisticDistribution(double mu,
double scale)
public int length()
Distributionpublic double mean()
Distributionpublic double variance()
Distributionpublic double sd()
Distributionpublic double entropy()
Distributionpublic java.lang.String toString()
toString in class java.lang.Objectpublic double rand()
Distributionpublic double p(double x)
Distributionpublic double logp(double x)
Distributionpublic double cdf(double x)
Distributionpublic double quantile(double p)
Distribution