public class LogisticDistribution extends Distribution implements java.io.Serializable
CONTINUOUS, DISCRETE, MIXED
Constructor and Description |
---|
LogisticDistribution()
This default constructor creates a new logsitic distribution and sets up
the default computational domain (−7, 7).
|
Modifier and Type | Method and Description |
---|---|
double |
getCDF(double x)
This method computes the cumulative distribution function, which is
F(x) = ex / (1 + ex)
|
double |
getDensity(double x)
This method computes the probability density function,which is
f(x) = ex / (1 + ex)2
|
double |
getMaxDensity()
This method computes the maximum value of the density function, which is
1/4, the value of the density at x = 0.
|
double |
getMean()
This method returns the mean of the distribution, which is 0.
|
double |
getMGF(double t)
This method computes the moment generating function, which is
Γ(1 + t) / Γ(1 − t).
|
double |
getQuantile(double p)
This method comptues the quantile function.
|
double |
getVariance()
This method computes the variance of the distribution, which is
π2 / 3.
|
java.lang.String |
toString()
This method returns a string that gives the name of the distribution and the values of
the parameters.
|
public LogisticDistribution()
public double getDensity(double x)
getDensity
in class Distribution
x
- a real numberpublic double getMaxDensity()
getMaxDensity
in class Distribution
public double getCDF(double x)
getCDF
in class Distribution
x
- a real numberpublic double getQuantile(double p)
getQuantile
in class Distribution
p
- a probability in (0, 1)public double getMean()
getMean
in class Distribution
public double getVariance()
getVariance
in class Distribution
public double getMGF(double t)
getMGF
in class Distribution
t
- a number < 1public java.lang.String toString()
toString
in class Distribution