public class LogNormalDistribution extends Distribution implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static double |
C |
CONTINUOUS, DISCRETE, MIXED
Constructor and Description |
---|
LogNormalDistribution()
This default constructor creates the standard lognormal distribution.
|
LogNormalDistribution(double m,
double s)
This general constructor creates a new lognormal distribution with
specified parameters.
|
Modifier and Type | Method and Description |
---|---|
double |
getCDF(double x)
This method computes the cumulative distribution function.
|
double |
getDensity(double x)
This method computes the probability density function.
|
double |
getLocation()
This method returns the location parameter of ln(Y).
|
double |
getMaxDensity()
This method computes the maximum value of the density function.
|
double |
getMean()
This method computes the mean of the distribution.
|
double |
getMGF(double t)
This method computes the moment generating function.
|
double |
getMoment(double a,
int n)
This method returns the moment of a specified order about a specified point.
|
double |
getMoment(int n)
This method computes the moment of a specified order.
|
double |
getScale()
This method gets the scale parameter of ln(Y).
|
double |
getVariance()
This method computes the variance of the distribution.
|
void |
setLocation(double m)
This method sets the location parameter of ln(Y).
|
void |
setParameters(double m,
double s)
This method sets the parameters, computes the default domain.
|
void |
setScale(double s)
This method sets the scale parameter of ln(Y).
|
double |
simulate()
This method simulates a value from the distribution.
|
java.lang.String |
toString()
This method returns a string that gives the name of the distribution and the values of
the parameters.
|
getDomain, getFailureRate, getMedian, getPGF, getQuantile, getSD, getType, setDomain, setDomain
public LogNormalDistribution(double m, double s)
m
- the location parameter of ln(Y)s
- the scale parameter of ln(Y)public LogNormalDistribution()
public void setParameters(double m, double s)
m
- the location parameter of ln(Y)s
- the scale parameter of ln(Y)public double getDensity(double x)
getDensity
in class Distribution
x
- a number in the domain of the distribution [0, ∞)public double getMaxDensity()
getMaxDensity
in class Distribution
public double getMean()
getMean
in class Distribution
public double getVariance()
getVariance
in class Distribution
public double getMoment(int n)
getMoment
in class Distribution
n
- the orderpublic double getMoment(double a, int n)
getMoment
in class Distribution
n
- the ordera
- the centerpublic double getMGF(double t)
getMGF
in class Distribution
t
- a real numberpublic double simulate()
simulate
in class Distribution
public double getLocation()
public void setLocation(double m)
m
- the location parameterpublic double getScale()
public void setScale(double s)
s
- the scale parameterpublic double getCDF(double x)
getCDF
in class Distribution
x
- a value in the domain of the distributionpublic java.lang.String toString()
toString
in class Distribution