public class PascalDist extends NegativeBinomialDist
BinomialDist.
This p(x) can be interpreted as the probability of having x failures
before the nth success in a sequence of independent Bernoulli trials
with probability of success p.
For n = 1, this gives the geometric distribution.MAXNEPSILON| Constructor and Description |
|---|
PascalDist(int n,
double p)
Creates an object that contains the probability
terms and the distribution function for
the Pascal distribution with parameter n and p.
|
| Modifier and Type | Method and Description |
|---|---|
static PascalDist |
getInstanceFromMLE(int[] x,
int m)
Creates a new instance of a Pascal distribution with parameters n and
p estimated using the maximum likelihood method based on the m
observations x[i],
i = 0, 1,…, m - 1.
|
static double[] |
getMaximumLikelihoodEstimate(int[] x,
int m)
Deprecated.
|
static double[] |
getMLE(int[] x,
int m)
Estimates the parameter (n, p) of the Pascal distribution
using the maximum likelihood method, from the m observations
x[i],
i = 0, 1,…, m - 1.
|
int |
getN()
Returns the parameter n of this object.
|
double[] |
getParams()
Return a table containing the parameters of the current distribution.
|
void |
setParams(int n,
double p)
Sets the parameter n and p of this object.
|
java.lang.String |
toString() |
barF, cdf, cdf, getGamma, getInstanceFromMLE, getMaximumLikelihoodEstimate, getMean, getMean, getMLE, getP, getStandardDeviation, getStandardDeviation, getVariance, getVariance, inverseF, inverseFInt, prob, prob, setParamspublic PascalDist(int n,
double p)
public static double[] getMLE(int[] x,
int m)
x - the list of observations used to evaluate parametersm - the number of observations used to evaluate parameters@Deprecated
public static double[] getMaximumLikelihoodEstimate(int[] x,
int m)
getMLE.public static PascalDist getInstanceFromMLE(int[] x, int m)
x - the list of observations to use to evaluate parametersm - the number of observations to use to evaluate parameterspublic int getN()
public void setParams(int n,
double p)
public double[] getParams()
getParams in interface DistributiongetParams in class NegativeBinomialDistpublic java.lang.String toString()
toString in class NegativeBinomialDistTo submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.