@Alias(value="lognormal") public class LogNormalDistribution extends AbstractDistribution
Modifier and Type | Class and Description |
---|---|
static class |
LogNormalDistribution.Parameterizer
Parameterization class
|
Modifier and Type | Field and Description |
---|---|
private double |
logmean
Mean value for the generator
|
private double |
logstddev
Standard deviation
|
private double |
shift
Additional shift factor
|
random
Constructor and Description |
---|
LogNormalDistribution(double logmean,
double logstddev,
double shift)
Constructor.
|
LogNormalDistribution(double logmean,
double logstddev,
double shift,
Random random)
Constructor for Log-Normal distribution
|
LogNormalDistribution(double logmean,
double logstddev,
double shift,
RandomFactory random)
Constructor for Log-Normal distribution
|
Modifier and Type | Method and Description |
---|---|
double |
cdf(double val)
Return the cumulative density function at the given value.
|
static double |
cdf(double x,
double mu,
double sigma)
Cumulative probability density function (CDF) of a normal distribution.
|
double |
nextRandom()
Generate a new random value
|
double |
pdf(double val)
Return the density of an existing value
|
static double |
pdf(double x,
double mu,
double sigma)
Probability density function of the normal distribution.
|
double |
quantile(double val)
Quantile aka probit (for normal) aka inverse CDF (invcdf, cdf^-1) function.
|
static double |
quantile(double x,
double mu,
double sigma)
Inverse cumulative probability density function (probit) of a normal
distribution.
|
String |
toString()
Describe the distribution
|
private double logmean
private double logstddev
private double shift
public LogNormalDistribution(double logmean, double logstddev, double shift, Random random)
logmean
- Meanlogstddev
- Standard Deviationshift
- Shifting offsetrandom
- Random generatorpublic LogNormalDistribution(double logmean, double logstddev, double shift, RandomFactory random)
logmean
- Meanlogstddev
- Standard Deviationshift
- Shifting offsetrandom
- Random generatorpublic LogNormalDistribution(double logmean, double logstddev, double shift)
logmean
- Meanlogstddev
- Standard deviationshift
- Shifting offsetpublic double pdf(double val)
Distribution
val
- existing valuepublic double cdf(double val)
Distribution
val
- existing valuepublic double quantile(double val)
Distribution
val
- Quantile to findpublic static double pdf(double x, double mu, double sigma)
1/(SQRT(2*pi)*sigma*x) * e^(-log(x-mu)^2/2sigma^2)
x
- The value.mu
- The mean.sigma
- The standard deviation.public static double cdf(double x, double mu, double sigma)
x
- value to evaluate CDF atmu
- Mean valuesigma
- Standard deviation.public static double quantile(double x, double mu, double sigma)
x
- value to evaluate probit function atmu
- Mean valuesigma
- Standard deviation.public double nextRandom()
Distribution
nextRandom
in interface Distribution
nextRandom
in class AbstractDistribution
public String toString()
Distribution
toString
in interface Distribution
toString
in class Object