public class LogNormalPD extends ProbabilityDistribution implements Serializable, Cloneable, PDFHessianInterface, ClosedFormMaximumLikelihoodInterface
Constructor and Description |
---|
LogNormalPD()
Constructor for the log-normal probability distribution.
|
Modifier and Type | Method and Description |
---|---|
double[] |
getClosedFormMLE(double[] x)
Returns the closed form maximum likelihood estimates.
|
double[] |
getClosedFormMlStandardError(double[] x)
Returns the standard errors of the closed form maximum likelihood estimates.
|
double[] |
getMethodOfMomentsEstimates(double[] x)
Returns the method-of-moments estimates given the sample data.
|
double[] |
getParameterLowerBounds()
Returns the lower bounds of the parameters.
|
double[] |
getParameterUpperBounds()
Returns the upper bounds of the parameters.
|
double[] |
getPDFGradient(double x,
double... params)
Returns the analytic gradient of the pdf evaluated at
x . |
double[][] |
getPDFHessian(double x,
double... params)
Returns the analytic Hessian of the pdf evaluated at
x . |
double |
pdf(double x,
double... params)
Returns the value of the probability density function.
|
getNumberOfParameters, getPDFGradientApproximation, getPDFHessianApproximation, getRangeOfX, setRangeOfX
public LogNormalPD()
public double[] getParameterLowerBounds()
getParameterLowerBounds
in class ProbabilityDistribution
double
array of length 2 containing the lower
bounds for \(\mu\in\mathbb{R}\) and \(\sigma\gt0\)public double[] getParameterUpperBounds()
getParameterUpperBounds
in class ProbabilityDistribution
double
array of length 2 containing the upper
bounds for \(\mu\in\mathbb{R}\) and \(\sigma\gt0\)public double pdf(double x, double... params)
The probability density function of the log-normal distribution is $$f\left(x\right)=\frac{1}{x\sigma\sqrt{2\pi}} {e^{-\frac{{(\ln{x}-\mu)}^2 }{2{\sigma}^2}}}$$ where \(\mu\) is a location parameter and \(\sigma > 0\) is the scale parameter.
pdf
in class ProbabilityDistribution
x
- a double
, the value (quantile) at which to evaluate
the pdf. x
must be strictly positive.params
- a double
array containing the parameters.
The parameters can also be given in the form pdf(x,a,b)
,
where a
=\(\mu\) and b
=\(\sigma\) are scalars.double
, the probability density at
x
given the parameter valuespublic double[] getPDFGradient(double x, double... params)
x
.getPDFGradient
in interface PDFGradientInterface
x
- a double
, the value (quantile) at which to evaluate
the pdf. x
must be strictly positive.params
- a double
array containing the parametersdouble
array containing the first partial derivatives
of the pdf with respect to the parameters evaluated at x
and the
input values params
public double[][] getPDFHessian(double x, double... params)
x
.getPDFHessian
in interface PDFHessianInterface
x
- a double
, the value at which to evaluate the Hessian.
x
must be strictly positive.params
- a double
array containing the parameters, \(\mu\) and \(\sigma\).double
matrix containing the second partial
derivatives of the pdf with respect to the parameterspublic double[] getClosedFormMLE(double[] x)
getClosedFormMLE
in interface ClosedFormMaximumLikelihoodInterface
x
- a double
array containing the datadouble
array containing maximum likelihood estimates for
\(\mu, \sigma\)public double[] getClosedFormMlStandardError(double[] x)
getClosedFormMlStandardError
in interface ClosedFormMaximumLikelihoodInterface
x
- a double
array containing the datadouble
array containing the standard errors for the
estimates of \(\mu, \sigma\)public double[] getMethodOfMomentsEstimates(double[] x)
x
- a double
array containing the datadouble
array containing method-of-moments
estimates for \(\mu\) and \(\sigma\)Copyright © 2020 Rogue Wave Software. All rights reserved.