public class NormalPD extends ProbabilityDistribution implements PDFHessianInterface, ClosedFormMaximumLikelihoodInterface, Serializable, Cloneable
Constructor and Description |
---|
NormalPD()
Constructor for the 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[] |
getMLEs(double[] x)
Deprecated.
Use
NormalPD.getClosedFormMLE(double[]) instead. |
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.
|
double[][] |
getPDFHessian(double x,
double... params)
Returns the analytic Hessian matrix of the pdf.
|
double |
pdf(double x,
double... params)
Returns the value of the normal probability density function.
|
getNumberOfParameters, getPDFGradientApproximation, getPDFHessianApproximation, getRangeOfX, setRangeOfX
public double[] getParameterLowerBounds()
getParameterLowerBounds
in class ProbabilityDistribution
double
array containing the lower bounds for
μ∈R and σ>0public double[] getParameterUpperBounds()
getParameterUpperBounds
in class ProbabilityDistribution
double
array containing the upper bounds
for μ∈R and σ>0public double pdf(double x, double... params)
The probability density function for a normal distribution is given by f(x;μ,σ)=1√2πσexp−(x−μ)22σ2 where μ and σ>0 are the mean and standard deviation of the random variable.
pdf
in class ProbabilityDistribution
x
- a double
, the value (quantile) at which to evaluate
the pdfparams
- a double
array containing values of the
parameters,μ and σ. The parameters can also be given
in the form pdf(x,a,b)
,
where a
=μ and b
=σ are scalars.double
, the probability density at
x
given the parameter valuespublic double[] getPDFGradient(double x, double... params)
getPDFGradient
in interface PDFGradientInterface
x
- a double
, the value at which to evaluate
the gradientparams
- a double
array containing the parametersdouble
array containing the partial derivatives of
the pdf with respect to the parameterspublic double[][] getPDFHessian(double x, double... params)
getPDFHessian
in interface PDFHessianInterface
x
- a double
, the value at which to evaluate
the Hessianparams
- a double
array containing the parametersdouble
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 the maximum likelihood estimates
for μ and σpublic double[] getMLEs(double[] x)
NormalPD.getClosedFormMLE(double[])
instead.These are the maximum likelihood estimates for the mean and standard deviation of the Normal distribution, given the data.
x
- a double
array containing the datadouble
array containing the mean and standard
deviationpublic double[] getClosedFormMlStandardError(double[] x)
getClosedFormMlStandardError
in interface ClosedFormMaximumLikelihoodInterface
x
- a double
array containing the datadouble
array containing the standard errors for the
estimates of μ,σCopyright © 2020 Rogue Wave Software. All rights reserved.