|
SSJ V. 1.2.5. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectumontreal.iro.lecuyer.probdist.DiscreteDistributionInt
umontreal.iro.lecuyer.probdist.NegativeBinomialDist
umontreal.iro.lecuyer.probdist.PascalDist
public class PascalDist
The Pascal distribution is a special case of the negative binomial distribution with parameters n and p, where n is a positive integer and 0 <= p <= 1. Its mass function is
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.
| Field Summary |
|---|
| Fields inherited from class umontreal.iro.lecuyer.probdist.NegativeBinomialDist |
|---|
MAXN |
| Fields inherited from class umontreal.iro.lecuyer.probdist.DiscreteDistributionInt |
|---|
EPSILON |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
static NegativeBinomialDist |
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 in table x[i], i = 0, 1,…, m - 1. |
static double[] |
getMaximumLikelihoodEstimate(int[] x,
int m)
Estimates and returns the parameters [hat(n), hat(p)] of the Pascal distribution using the maximum likelihood method based on the m observations in table x[i], i = 0, 1,…, m - 1. |
int |
getN()
Returns the parameter n of this object. |
void |
setParams(int n,
double p)
Sets the parameter n and p of this object. |
| Methods inherited from class umontreal.iro.lecuyer.probdist.NegativeBinomialDist |
|---|
barF, cdf, cdf, getGamma, getInstanceFromMLE, getMaximumLikelihoodEstimate, getMean, getMean, getP, getStandardDeviation, getStandardDeviation, getVariance, getVariance, inverseF, inverseFInt, prob, prob, setParams |
| Methods inherited from class umontreal.iro.lecuyer.probdist.DiscreteDistributionInt |
|---|
barF, cdf, inverseF |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PascalDist(int n,
double p)
| Method Detail |
|---|
public static NegativeBinomialDist getInstanceFromMLE(int[] x,
int m)
x - the list of observations to use to evaluate parametersm - the number of observations to use to evaluate parameters
public static double[] getMaximumLikelihoodEstimate(int[] x,
int m)
x - the list of observations used to evaluate parametersm - the number of observations used to evaluate parameters
public int getN()
public void setParams(int n,
double p)
|
SSJ V. 1.2.5. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||