|
SSJ V. 2.6.2. |
||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
Distribution | This interface should be implemented by all classes supporting discrete and continuous distributions. |
Class Summary | |
---|---|
AndersonDarlingDist | Extends the class ContinuousDistribution for the
Anderson-Darling distribution (see). |
AndersonDarlingDistQuick | Extends the class AndersonDarlingDist for the
distribution (see). |
BernoulliDist | Extends the class DiscreteDistributionInt for the Bernoulli
distribution with parameter p, where
0 <= p <= 1. |
BetaDist | Extends the class ContinuousDistribution for
the beta distribution with shape parameters
α > 0 and β > 0, over the interval [a, b], where a < b. |
BetaSymmetricalDist | Specializes the class BetaDist to the case of a symmetrical
beta distribution over the interval [0, 1],
with shape parameters
α = β. |
BinomialDist | Extends the class DiscreteDistributionInt for the
binomial distribution with parameters n and p, where
n is a positive integer and
0 <= p <= 1. |
CauchyDist | Extends the class ContinuousDistribution for
the Cauchy distribution
with location parameter α
and scale parameter β > 0. |
ChiDist | Extends the class ContinuousDistribution for the chi
distribution with shape parameter
v > 0, where the number of degrees of freedom
v is a positive integer. |
ChiSquareDist | Extends the class ContinuousDistribution for
the chi-square distribution with n degrees of freedom,
where n is a positive integer. |
ChiSquareDistQuick | Provides a variant of ChiSquareDist with
faster but less accurate methods. |
ChiSquareNoncentralDist | Extends the class ContinuousDistribution for
the noncentral chi-square distribution with ν degrees of freedom
and noncentrality parameter λ, where ν > 0 and
λ > 0. |
ConstantDist | Represents a constant discrete distribution taking a single real value with probability 1. |
ConstantIntDist | Represents a constant discrete distribution taking a single integer value with probability 1. |
ContinuousDistribution | Classes implementing continuous distributions should inherit from this base class. |
CramerVonMisesDist | Extends the class ContinuousDistribution for the
Cramér-von Mises distribution (see). |
DiscreteDistribution | This class implements discrete distributions over a finite set of real numbers (also over integers as a particular case). |
DiscreteDistributionInt | Classes implementing discrete distributions over the integers should inherit from this class. |
DistributionFactory | This class implements a string API for the package probdist. |
EmpiricalDist | Extends DiscreteDistribution to an empirical
distribution function,
based on the observations
X(1),..., X(n) (sorted by increasing order). |
ErlangDist | Extends the class GammaDist for the special case
of the Erlang distribution with
shape parameter k > 0 and scale parameter
λ > 0. |
ExponentialDist | Extends the class ContinuousDistribution for
the exponential distribution
with mean 1/λ where
λ > 0. |
ExponentialDistFromMean | Extends the ExponentialDist class with a constructor accepting as
argument the mean 1/λ instead of the rate λ. |
ExtremeValueDist | Deprecated. |
FatigueLifeDist | Extends the class ContinuousDistribution for
the fatigue life distribution with location
parameter μ, scale parameter β and shape
parameter γ. |
FisherFDist | Extends the class ContinuousDistribution for
the Fisher F distribution with n1 and n2
degrees of freedom, where n1 and n2 are positive integers. |
FoldedNormalDist | Extends the class ContinuousDistribution for
the folded normal distribution with
parameters μ >= 0 and
σ > 0. |
FrechetDist | Extends the class ContinuousDistribution for the Fréchet
distribution, with location parameter δ, scale
parameter β > 0, and shape parameter
α > 0, where we use
the notation
z = (x - δ)/β. |
GammaDist | Extends the class ContinuousDistribution for
the gamma distribution with
shape parameter
α > 0 and scale parameter
λ > 0. |
GammaDistFromMoments | Extends the GammaDist distribution with constructors accepting the
mean μ and variance σ2 as arguments instead of a shape parameter
α and a scale parameter λ. |
GeometricDist | Extends the class DiscreteDistributionInt for
the geometric distribution with parameter
p, where 0 < p < 1. |
GumbelDist | Extends the class ContinuousDistribution for
the Gumbel distribution, with location parameter
δ and scale parameter
β≠ 0. |
HalfNormalDist | Extends the class ContinuousDistribution for the half-normal
distribution with parameters μ and
σ > 0. |
HyperbolicSecantDist | Extends the class ContinuousDistribution for
the hyperbolic secant distribution with location
parameter μ and scale parameter
σ > 0. |
HypergeometricDist | Extends the class DiscreteDistributionInt for
the hypergeometric distribution with
k elements chosen among l, m being
of one type, and l - m of the other. |
HypoExponentialDist | This class implements the hypoexponential distribution, also called the generalized Erlang distribution. |
HypoExponentialDistEqual | This class implements the hypoexponential distribution for the case of equidistant λi = (n + 1 - i)h. |
HypoExponentialDistQuick | This class is a subclass of HypoExponentialDist
and also implements the hypoexponential distribution. |
InverseDistFromDensity | Implements a method for computing the inverse of an arbitrary continuous distribution function when only the probability density is known. |
InverseGammaDist | Extends the class ContinuousDistribution for
the inverse gamma distribution with shape parameter
α > 0 and scale parameter β > 0. |
InverseGaussianDist | Extends the class ContinuousDistribution for
the inverse Gaussian distribution with location parameter
μ > 0 and scale parameter
λ > 0. |
JohnsonSBDist | Extends the class ContinuousDistribution for
the Johnson SB distribution
with shape parameters γ and
δ > 0, location parameter ξ,
and scale parameter λ > 0. |
JohnsonSLDist | Extends the class ContinuousDistribution for
the Johnson SL distribution. |
JohnsonSUDist | Extends the class ContinuousDistribution for
the Johnson SU distribution. |
KolmogorovSmirnovDist | Extends the class ContinuousDistribution for the
Kolmogorov-Smirnov distribution with parameter n. |
KolmogorovSmirnovDistQuick | Extends the class KolmogorovSmirnovDist for the distribution. |
KolmogorovSmirnovPlusDist | Extends the class ContinuousDistribution for the
Kolmogorov-Smirnov+ distribution (see). |
LaplaceDist | Extends the class ContinuousDistribution for
the Laplace distribution. |
LogarithmicDist | Extends the class DiscreteDistributionInt for
the logarithmic distribution. |
LogisticDist | Extends the class ContinuousDistribution for the
logistic distribution. |
LoglogisticDist | Extends the class ContinuousDistribution for the
Log-Logistic distribution with shape parameter
α > 0
and scale parameter β > 0. |
LognormalDist | Extends the class ContinuousDistribution for the
lognormal distribution. |
LognormalDistFromMoments | Extends the LognormalDist class with a constructor accepting the
mean m and the variance v of the distribution as arguments. |
NakagamiDist | Extends the class ContinuousDistribution for
the Nakagami distribution with location parameter a,
scale parameter
λ > 0 and shape parameter c > 0. |
NegativeBinomialDist | Extends the class DiscreteDistributionInt for
the negative binomial distribution with real
parameters n and p, where n > 0 and
0 <= p <= 1. |
NormalDist | Extends the class ContinuousDistribution for the normal
distribution (e.g.,). |
NormalDistQuick | A variant of the class NormalDist (for the normal
distribution with mean μ and variance σ2). |
NormalInverseGaussianDist | Extends the class ContinuousDistribution for
the normal inverse gaussian distribution with location parameter
μ, scale parameter
δ > 0, tail heavyness
α > 0, and
asymmetry parameter β such that
0 <= | β| < α. |
ParetoDist | Extends the class ContinuousDistribution for a distribution
from the Pareto family, with
shape parameter
α > 0 and location parameter β > 0. |
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. |
Pearson5Dist | Deprecated. |
Pearson6Dist | Extends the class ContinuousDistribution for
the Pearson type VI distribution with shape parameters
α1 > 0 and
α2 > 0, and scale parameter β > 0. |
PiecewiseLinearEmpiricalDist | Extends the class ContinuousDistribution for a piecewise-linear
approximation of the empirical distribution function,
based on the observations
X(1),..., X(n) (sorted by increasing order),
and defined as follows (e.g.,). |
PoissonDist | Extends the class DiscreteDistributionInt for the
Poisson distribution with mean
λ >= 0. |
PowerDist | Extends the class ContinuousDistribution for
the power distribution with shape parameter
c > 0, over the interval [a, b], where a < b. |
RayleighDist | This class extends the class ContinuousDistribution for
the Rayleigh distribution with
location parameter a, and scale parameter β > 0. |
StudentDist | Extends the class ContinuousDistribution for
the Student t-distribution
with n degrees of freedom, where n is a positive integer. |
StudentDistQuick | Extends the class StudentDist for
the Student t-distribution. |
TriangularDist | Extends the class ContinuousDistribution for
the triangular distribution with domain [a, b] and mode
(or shape parameter) m, where
a <= m <= b. |
TruncatedDist | This container class takes an arbitrary continuous distribution and truncates it to an interval [a, b], where a and b can be finite or infinite. |
UniformDist | Extends the class ContinuousDistribution for
the uniform distribution
over the interval [a, b]. |
UniformIntDist | Extends the class DiscreteDistributionInt for
the discrete uniform distribution over the range [i, j]. |
WatsonGDist | Extends the class ContinuousDistribution for the
Watson G distribution (see). |
WatsonUDist | Extends the class ContinuousDistribution for the
Watson U distribution (see). |
WeibullDist | This class extends the class ContinuousDistribution for
the Weibull distribution with shape parameter
α > 0, location parameter δ, and scale parameter
λ > 0. |
This package contains a set of Java classes providing methods to compute mass, density, distribution, complementary distribution, and inverse distribution functions for some discrete and continuous probability distributions. It also provides methods to estimate the parameters of some distributions from empirical data. It does not generate random variates; for that, see the package umontreal.iro.lecuyerrandvar. It is possible to plot the density or the cumulative probabilities of a distribution function either on screen, or in a LATEX file, but for this, one has to use the package umontreal.iro.lecuyercharts.
We recall that the distribution function of a continuous random variable X with density f over the real line is
while that of a discrete random variable X with mass function p over a fixed set of real numbers x0 < x1 < x2 < ... is where p(xi) = P[X = xi]. For a discrete distribution over the set of integers, one has where p(s) = P[X = s].We define , the complementary distribution function of X, by
The inverse distribution function is defined as
for 0≤u≤1. This function F-1 is often used, among other things, to generate the random variable X by inversion, by passing a U(0, 1) random variate as the value of u.The package probdist offers two types of tools for computing p, f, F, [tex2html_wrap_inline260], and F-1: static methods, for which no object needs to be created, and methods associated with distribution objects. Standard distributions are implemented each in their own class. Constructing an object from one of these classes can be convenient if F, [tex2html_wrap_inline264], etc., has to be evaluated several times for the same distribution. In certain cases (for the Poisson distribution, for example), creating the distribution object would precompute tables that would speed up significantly all subsequent method calls for computing F, [tex2html_wrap_inline267], etc. This trades memory, plus a one-time setup cost, for speed. In addition to the non-static methods, the distribution classes also provide static methods that do not require the creation of an object.
The distribution classes extend one of the (abstract) classes umontreal.iro.lecuyer.probdistDiscreteDistribution and umontreal.iro.lecuyer.probdistContinuousDistribution (which both implement the interface umontreal.iro.lecuyer.probdistDistribution) for discrete and continuous distributions over the real numbers, or umontreal.iro.lecuyer.probdistDiscreteDistributionInt, for discrete distributions over the non-negative integers.
For example, the class umontreal.iro.lecuyer.probdistPoissonDist extends umontreal.iro.lecuyer.probdistDiscreteDistributionInt. Calling a static method from this class will compute the corresponding probability from scratch. Constructing a umontreal.iro.lecuyer.probdistPoissonDist object, on the other hand, will precompute tables that contain the probability terms and the distribution function for a given parameter λ (the mean of the Poisson distribution). These tables will then be used whenever a method is called for the corresponding object. This second approach is recommended if some of F, [tex2html_wrap_inline271], etc., has to be computed several times for the same parameter λ. As a rule of thumb, creating objects and using their methods is faster than just using static methods as soon as two or three calls are made, unless the parameters are large.
In fact, only the non-negligible probability terms (those that exceed the threshold umontreal.iro.lecuyer.probdistDiscreteDistributionIntEPSILON) are stored in the tables. For F and [tex2html_wrap_inline275], a single table actually contains F(x) for F(x)≤1/2 and 1 - F(x) for F(x) > 1/2. When the distribution parameters are so large that the tables would take too much space, these are not created and the methods automatically call their static equivalents instead of using tables.
Objects that implement the interface umontreal.iro.lecuyer.probdistDistribution (and sometimes the abstract class umontreal.iro.lecuyer.probdistContinuousDistribution) are required by some methods in package umontreal.iro.lecuyerrandvar and also in classes umontreal.iro.lecuyer.gofGofStat and umontreal.iro.lecuyer.gofGofFormat of package umontreal.iro.lecuyergof.
Some of the classes also provide methods that compute parameter estimations of the corresponding distribution from a set of empirical observations, in most cases based on the maximum likelihood method.
|
SSJ V. 2.6.2. |
||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |