public class GeometricPD extends ProbabilityDistribution implements Serializable, Cloneable, PDFHessianInterface, ClosedFormMaximumLikelihoodInterface
| Constructor and Description |
|---|
GeometricPD()
Constructor for the geometric probability distribution.
|
| Modifier and Type | Method and Description |
|---|---|
double[] |
getClosedFormMLE(double[] x)
Returns the maximum likelihood estimate for the parameter.
|
double[] |
getClosedFormMlStandardError(double[] x)
Returns the standard error of the maximum likelihood estimate.
|
double[] |
getMethodOfMomentsEstimates(double[] x)
Returns the method-of-moments estimates given the sample data.
|
double[] |
getParameterLowerBounds()
Returns the lower bound of the parameter.
|
double[] |
getParameterUpperBounds()
Returns the upper bound of the parameter.
|
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 matrix evaluated at
x. |
double |
pdf(double x,
double... params)
Returns the value of the geometric probability density function.
|
getNumberOfParameters, getPDFGradientApproximation, getPDFHessianApproximation, getRangeOfX, setRangeOfXpublic GeometricPD()
public double[] getParameterLowerBounds()
getParameterLowerBounds in class ProbabilityDistributiondouble array of length 1 containing the lower
bound (0)public double[] getParameterUpperBounds()
getParameterUpperBounds in class ProbabilityDistributiondouble array of length 1 containing the upper
bound (1.0)public double pdf(double x,
double... params)
Given the probability of success \(p\) for a sequence of independent and identical trials, the probability of \(X = k \in {0,1,2,\ldots }\) failures until the first success is given by \(Pr[X=k]=(1-p)^k p \). The discrete random variable \(X\) is a geometric random variable with parameter \(p\).
pdf in class ProbabilityDistributionx - a double, the value (quantile) at which to
evaluate the pdf. x must be a non-negative integer. If
x is not a whole number the floor() value will
be used.params - a double, the probability of
successdouble, the probability density at
x given the parameter valuepublic double[] getPDFGradient(double x,
double... params)
x.getPDFGradient in interface PDFGradientInterfacex - a double value. x must be a non-negative
integer. If x is not a whole number the
floor() value will be used.params - a double specifying the probability of
successdouble array containing the first partial
derivative of the parameterspublic double[][] getPDFHessian(double x,
double... params)
x.getPDFHessian in interface PDFHessianInterfacex - a double value. x must be a non-negative
integer. If x is not a whole number the
floor() value will be used.params - a double specifying the probability of
successdouble matrix containing the second partial
derivatives of the parameterspublic double[] getClosedFormMLE(double[] x)
getClosedFormMLE in interface ClosedFormMaximumLikelihoodInterfacex - a double array containing the datadouble array containing the maximum likelihood estimate(s)public double[] getClosedFormMlStandardError(double[] x)
getClosedFormMlStandardError in interface ClosedFormMaximumLikelihoodInterfacex - a double array containing the datadouble array containing the standard errorspublic double[] getMethodOfMomentsEstimates(double[] x)
x - a double array containing the datadouble array containing method-of-moments
estimate(s)Copyright © 2020 Rogue Wave Software. All rights reserved.