Package com.imsl.stat.distributions
Class LogNormalPD
java.lang.Object
com.imsl.stat.distributions.ProbabilityDistribution
com.imsl.stat.distributions.LogNormalPD
- All Implemented Interfaces:
ClosedFormMaximumLikelihoodInterface,com.imsl.stat.distributions.MethodOfMomentsInterface,PDFGradientInterface,PDFHessianInterface,Serializable,Cloneable
public class LogNormalPD
extends ProbabilityDistribution
implements Serializable, Cloneable, PDFHessianInterface, ClosedFormMaximumLikelihoodInterface, com.imsl.stat.distributions.MethodOfMomentsInterface
The log-normal probability distribution.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]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[]Returns the lower bounds of the parameters.double[]Returns the upper bounds of the parameters.double[]getPDFGradient(double x, double... params) Returns the analytic gradient of the pdf evaluated atx.double[][]getPDFHessian(double x, double... params) Returns the analytic Hessian of the pdf evaluated atx.doublepdf(double x, double... params) Returns the value of the probability density function.Methods inherited from class com.imsl.stat.distributions.ProbabilityDistribution
getNumberOfParameters, getPDFGradientApproximation, getPDFHessianApproximation, getRangeOfX, setRangeOfX
-
Constructor Details
-
LogNormalPD
public LogNormalPD()Constructor for the log-normal probability distribution.
-
-
Method Details
-
getParameterLowerBounds
public double[] getParameterLowerBounds()Returns the lower bounds of the parameters.- Specified by:
getParameterLowerBoundsin classProbabilityDistribution- Returns:
- a
doublearray of length 2 containing the lower bounds for \(\mu\in\mathbb{R}\) and \(\sigma\gt0\)
-
getParameterUpperBounds
public double[] getParameterUpperBounds()Returns the upper bounds of the parameters.- Specified by:
getParameterUpperBoundsin classProbabilityDistribution- Returns:
- a
doublearray of length 2 containing the upper bounds for \(\mu\in\mathbb{R}\) and \(\sigma\gt0\)
-
pdf
public double pdf(double x, double... params) Returns the value of the probability density function.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.
- Specified by:
pdfin classProbabilityDistribution- Parameters:
x- adouble, the value (quantile) at which to evaluate the pdf.xmust be strictly positive.params- adoublearray containing the parameters. The parameters can also be given in the formpdf(x,a,b), wherea=\(\mu\) andb=\(\sigma\) are scalars.- Returns:
- a
double, the probability density atxgiven the parameter values
-
getPDFGradient
public double[] getPDFGradient(double x, double... params) Returns the analytic gradient of the pdf evaluated atx.- Specified by:
getPDFGradientin interfacePDFGradientInterface- Parameters:
x- adouble, the value (quantile) at which to evaluate the pdf.xmust be strictly positive.params- adoublearray containing the parameters- Returns:
- a
doublearray containing the first partial derivatives of the pdf with respect to the parameters evaluated atxand the input valuesparams
-
getPDFHessian
public double[][] getPDFHessian(double x, double... params) Returns the analytic Hessian of the pdf evaluated atx.- Specified by:
getPDFHessianin interfacePDFHessianInterface- Parameters:
x- adouble, the value at which to evaluate the Hessian.xmust be strictly positive.params- adoublearray containing the parameters, \(\mu\) and \(\sigma\).- Returns:
- a
doublematrix containing the second partial derivatives of the pdf with respect to the parameters
-
getClosedFormMLE
public double[] getClosedFormMLE(double[] x) Returns the closed form maximum likelihood estimates.- Specified by:
getClosedFormMLEin interfaceClosedFormMaximumLikelihoodInterface- Parameters:
x- adoublearray containing the data- Returns:
- a
doublearray containing maximum likelihood estimates for \(\mu, \sigma\)
-
getClosedFormMlStandardError
public double[] getClosedFormMlStandardError(double[] x) Returns the standard errors of the closed form maximum likelihood estimates.- Specified by:
getClosedFormMlStandardErrorin interfaceClosedFormMaximumLikelihoodInterface- Parameters:
x- adoublearray containing the data- Returns:
- a
doublearray containing the standard errors for the estimates of \(\mu, \sigma\)
-
getMethodOfMomentsEstimates
public double[] getMethodOfMomentsEstimates(double[] x) Returns the method-of-moments estimates given the sample data.- Specified by:
getMethodOfMomentsEstimatesin interfacecom.imsl.stat.distributions.MethodOfMomentsInterface- Parameters:
x- adoublearray containing the data- Returns:
- a
doublearray containing method-of-moments estimates for \(\mu\) and \(\sigma\)
-