Class Poisson
-
- All Implemented Interfaces:
-
java.io.Serializable,jline.lang.Copyable
public class Poisson extends DiscreteDistribution implements Serializable
A Poisson discrete distribution
-
-
Constructor Summary
Constructors Constructor Description Poisson(double rate)
-
Method Summary
Modifier and Type Method Description static voidmain(Array<String> args)doubleevalCDF(double t)Evaluates the cumulative distribution function (CDF) at value t. doubleevalPDF(int n)doubleevalLST(double s)Evaluates the Laplace-Stieltjes Transform at s. doublegetMean()Gets the mean (expected value) of this distribution. doublegetRate()Gets the rate of this distribution (inverse of mean). doublegetSCV()Gets the squared coefficient of variation (SCV) of this distribution. doublegetSkewness()Gets the skewness of this distribution. doublegetVar()Gets the variance of this distribution. Array<double>sample(int nsamples, Random random)Generates random samples from this distribution using the specified random generator. MatrixCellgetProcess()-
Methods inherited from class jline.lang.processes.DiscreteDistribution
evalPMF, evalPMF, evalPMF -
Methods inherited from class jline.lang.processes.Distribution
evalProbInterval, getName, getNumParams, getParam, getSupport, isContinuous, isDisabled, isDiscrete, isImmediate, isMarkovian, mean, name, numParams, param, rate, sample, scv, setNumParams, setParam, skewness, support, var -
Methods inherited from class jline.lang.Copyable
copy -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
evalCDF
double evalCDF(double t)
Evaluates the cumulative distribution function (CDF) at value t. For a discrete Poisson distribution, this is P(X <= floor(t)).
- Parameters:
t- the value to evaluate- Returns:
the CDF value at t
-
evalPDF
double evalPDF(int n)
-
evalLST
double evalLST(double s)
Evaluates the Laplace-Stieltjes Transform at s. For Poisson(λ), LST(s) = exp(λ(e^(-s) - 1))
- Parameters:
s- the Laplace domain variable- Returns:
the LST value at s
-
getMean
double getMean()
Gets the mean (expected value) of this distribution.
- Returns:
the mean value
-
getRate
double getRate()
Gets the rate of this distribution (inverse of mean).
- Returns:
the rate value (1/mean)
-
getSCV
double getSCV()
Gets the squared coefficient of variation (SCV) of this distribution. SCV = Var(X) / E[X]^2.
- Returns:
the squared coefficient of variation
-
getSkewness
double getSkewness()
Gets the skewness of this distribution. Skewness measures the asymmetry of the probability distribution.
- Returns:
the skewness value
-
getVar
double getVar()
Gets the variance of this distribution. Computed as SCV * mean^2.
- Returns:
the variance
-
sample
Array<double> sample(int nsamples, Random random)
Generates random samples from this distribution using the specified random generator.
- Parameters:
random- the random number generator to use- Returns:
array of random samples
-
getProcess
MatrixCell getProcess()
-
-
-
-