Package com.imsl.stat.distributions
Class RayleighPD
java.lang.Object
com.imsl.stat.distributions.ProbabilityDistribution
com.imsl.stat.distributions.RayleighPD
- All Implemented Interfaces:
ClosedFormMaximumLikelihoodInterface,com.imsl.stat.distributions.MethodOfMomentsInterface,PDFGradientInterface,PDFHessianInterface,Serializable,Cloneable
public class RayleighPD
extends ProbabilityDistribution
implements Serializable, Cloneable, PDFHessianInterface, ClosedFormMaximumLikelihoodInterface, com.imsl.stat.distributions.MethodOfMomentsInterface
The Rayleigh probability distribution.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]getClosedFormMLE(double[] x) Returns the closed form maximum likelihood estimate.double[]getClosedFormMlStandardError(double[] x) Returns the standard error based on the closed form maximum likelihood estimate.double[]getMethodOfMomentsEstimates(double[] x) Returns the method-of-moments estimate given the sample data.double[]Returns the lower bound for the parameter.double[]Returns the upper bound for the parameter.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.doublepdf(double x, double... params) Returns the value of the Rayleigh probability density function.Methods inherited from class com.imsl.stat.distributions.ProbabilityDistribution
getNumberOfParameters, getPDFGradientApproximation, getPDFHessianApproximation, getRangeOfX, setRangeOfX
-
Constructor Details
-
RayleighPD
public RayleighPD()Constructor for the Rayleigh probability distribution.
-
-
Method Details
-
getParameterLowerBounds
public double[] getParameterLowerBounds()Returns the lower bound for the parameter.- Specified by:
getParameterLowerBoundsin classProbabilityDistribution- Returns:
- a
doublearray of length 1 containing the lower bound for \(\sigma>0\)
-
getParameterUpperBounds
public double[] getParameterUpperBounds()Returns the upper bound for the parameter.- Specified by:
getParameterUpperBoundsin classProbabilityDistribution- Returns:
- a
doublearray of length 1 containing the upper bound for \(\sigma>0\)
-
pdf
public double pdf(double x, double... params) Returns the value of the Rayleigh probability density function.The probability density function of the Rayleigh distribution is $$f\left(x;\sigma\right)=\begin{array}{ll} \frac{x}{\sigma^2}e^{-x^2/\left(2\sigma^2\right)}, & x\ge0 \end{array}$$ where \(\sigma > 0\) is the scale parameter.
- Specified by:
pdfin classProbabilityDistribution- Parameters:
x- adouble, the value (quantile) at which to evaluate the pdfparams- adouble, the scale parameter (\(\sigma\gt 0\))- Returns:
- a
double, the probability density atxgiven the parameter value
-
getPDFGradient
public double[] getPDFGradient(double x, double... params) Returns the analytic gradient of the pdf.- Specified by:
getPDFGradientin interfacePDFGradientInterface- Parameters:
x- adouble, the value at which to evaluate the gradient.xmust be non-negative.params- adouble, the scale parameter (\(\sigma\gt 0\))- Returns:
- a
doublearray containing the first partial derivative of the pdf with respect to the parameter
-
getPDFHessian
public double[][] getPDFHessian(double x, double... params) Returns the analytic Hessian matrix of the pdf.- Specified by:
getPDFHessianin interfacePDFHessianInterface- Parameters:
x- adouble, the value at which to evaluate the Hessian.xmust be non-negative.params- adouble, the scale parameter (\(\sigma\gt 0\))- Returns:
- a
doublematrix containing the second partial derivatives of the pdf with respect to the parameter
-
getClosedFormMLE
public double[] getClosedFormMLE(double[] x) Returns the closed form maximum likelihood estimate.- Specified by:
getClosedFormMLEin interfaceClosedFormMaximumLikelihoodInterface- Parameters:
x- adoublearray containing the data- Returns:
- a
doublearray containing the maximum likelihood estimate
-
getClosedFormMlStandardError
public double[] getClosedFormMlStandardError(double[] x) Returns the standard error based on the closed form maximum likelihood estimate.- Specified by:
getClosedFormMlStandardErrorin interfaceClosedFormMaximumLikelihoodInterface- Parameters:
x- adoublearray containing the data- Returns:
- a
doublearray containing the standard error
-
getMethodOfMomentsEstimates
public double[] getMethodOfMomentsEstimates(double[] x) Returns the method-of-moments estimate 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 estimate for the parameter
-