@PublicationReference(author="Wikipedia", title="Log-normal distribution", type=WebPage, year=2009, url="http://en.wikipedia.org/wiki/Log-normal_distribution") public class LogNormalDistribution extends AbstractClosedFormSmoothUnivariateDistribution implements EstimableDistribution<java.lang.Double,LogNormalDistribution>
Modifier and Type | Class and Description |
---|---|
static class |
LogNormalDistribution.CDF
CDF of the Log-Normal Distribution
|
static class |
LogNormalDistribution.MaximumLikelihoodEstimator
Maximum Likelihood Estimator of a log-normal distribution.
|
static class |
LogNormalDistribution.PDF
PDF of a Log-normal distribution
|
static class |
LogNormalDistribution.WeightedMaximumLikelihoodEstimator
Maximum Likelihood Estimator from weighted data
|
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_LOG_NORMAL_MEAN
Default log normal mean, 0.0.
|
static double |
DEFAULT_LOG_NORMAL_VARIANCE
Default log normal variance, 1.0.
|
static double |
SQRT2PI
Constant value of Math.sqrt(2*Math.PI)
|
Constructor and Description |
---|
LogNormalDistribution()
Default constructor.
|
LogNormalDistribution(double logNormalMean,
double logNormalVariance)
Creates a new instance of LogNormalDistribution
|
LogNormalDistribution(LogNormalDistribution other)
Copy Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
convertFromVector(Vector parameters)
Sets the parameters of the distribution from a
2-dimensional Vector with ( logNormalMean logNormalVariance )
|
Vector |
convertToVector()
Returns a 2-dimensional Vector with ( logNormalMean logNormalVariance )
|
LogNormalDistribution.CDF |
getCDF()
Gets the CDF of a scalar distribution.
|
LogNormalDistribution.MaximumLikelihoodEstimator |
getEstimator()
Gets an estimator associated with this distribution.
|
double |
getLogNormalMean()
Getter for logNormalMean
|
double |
getLogNormalVariance()
Getter for logNormalVariance
|
java.lang.Double |
getMaxSupport()
Gets the minimum support (domain or input) of the distribution.
|
double |
getMeanAsDouble()
Gets the mean of the distribution as a double.
|
java.lang.Double |
getMinSupport()
Gets the minimum support (domain or input) of the distribution.
|
LogNormalDistribution.PDF |
getProbabilityFunction()
Gets the distribution function associated with this Distribution,
either the PDF or PMF.
|
double |
getVariance()
Gets the variance of the distribution.
|
double |
sampleAsDouble(java.util.Random random)
Samples a value from this distribution as a double.
|
void |
sampleInto(java.util.Random random,
double[] output,
int start,
int length)
Samples values from this distribution as an array of doubles.
|
void |
setLogNormalMean(double logNormalMean)
Setter for logNormalMean
|
void |
setLogNormalVariance(double logNormalVariance)
Setter for logNormalVariance
|
java.lang.String |
toString() |
getMean, sampleAsDoubles, sampleInto
clone
sample, sample
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
sample, sample, sampleInto
clone
clone
public static final double DEFAULT_LOG_NORMAL_MEAN
public static final double DEFAULT_LOG_NORMAL_VARIANCE
public static final double SQRT2PI
public LogNormalDistribution()
public LogNormalDistribution(double logNormalMean, double logNormalVariance)
logNormalMean
- Mean of the underlying distribution, (-infinity,+infinity)logNormalVariance
- Variance of the underlying distribution, (0,infinity)public LogNormalDistribution(LogNormalDistribution other)
other
- LogNormalDistribution to copypublic Vector convertToVector()
convertToVector
in interface Vectorizable
public void convertFromVector(Vector parameters)
convertFromVector
in interface Vectorizable
parameters
- 2-dimensional Vector with ( logNormalMean logNormalVariance )public double getLogNormalMean()
public void setLogNormalMean(double logNormalMean)
logNormalMean
- Mean of the underlying distribution, (-infinity,+infinity)public double getLogNormalVariance()
public void setLogNormalVariance(double logNormalVariance)
logNormalVariance
- Variance of the underlying distribution, (0,infinity)public double getMeanAsDouble()
UnivariateDistribution
getMeanAsDouble
in interface UnivariateDistribution<java.lang.Double>
public double getVariance()
UnivariateDistribution
getVariance
in interface UnivariateDistribution<java.lang.Double>
public double sampleAsDouble(java.util.Random random)
SmoothUnivariateDistribution
sampleAsDouble
in interface SmoothUnivariateDistribution
sampleAsDouble
in class AbstractClosedFormSmoothUnivariateDistribution
random
- Random number generator to use.public void sampleInto(java.util.Random random, double[] output, int start, int length)
SmoothUnivariateDistribution
sampleInto
in interface SmoothUnivariateDistribution
random
- Random number generator to use.output
- The array to write the result into. Cannot be null.start
- The offset in the array to start writing at. Cannot be negative.length
- The number of values to sample. Cannot be negative.public LogNormalDistribution.CDF getCDF()
UnivariateDistribution
getCDF
in interface ClosedFormUnivariateDistribution<java.lang.Double>
getCDF
in interface SmoothUnivariateDistribution
getCDF
in interface UnivariateDistribution<java.lang.Double>
public LogNormalDistribution.PDF getProbabilityFunction()
ComputableDistribution
getProbabilityFunction
in interface ComputableDistribution<java.lang.Double>
getProbabilityFunction
in interface SmoothUnivariateDistribution
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Double getMinSupport()
UnivariateDistribution
getMinSupport
in interface UnivariateDistribution<java.lang.Double>
public java.lang.Double getMaxSupport()
UnivariateDistribution
getMaxSupport
in interface UnivariateDistribution<java.lang.Double>
public LogNormalDistribution.MaximumLikelihoodEstimator getEstimator()
EstimableDistribution
getEstimator
in interface EstimableDistribution<java.lang.Double,LogNormalDistribution>