|
SSJ V. 1.2.5. |
||||||||
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 | |
---|---|
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. |
ContinuousDistribution | Classes implementing continuous distributions should inherit from this class. |
DiscreteDistribution | Classes implementing discrete distributions over a finite set of real numbers should inherit from this class. |
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. |
ExtremeValueDist | Extends the class ContinuousDistribution for
the extreme value (or Gumbel) distribution, with location parameter
α and scale parameter
λ > 0. |
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 n and m
degrees of freedom, where n and m are positive integers. |
GammaDist | Extends the class ContinuousDistribution for
the gamma distribution with
shape parameter
α > 0 and scale parameter
λ > 0. |
GeometricDist | Extends the class DiscreteDistributionInt for
the geometric distribution with parameter
p, where 0 < p < 1. |
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. |
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. |
JohnsonSUDist | Extends the class ContinuousDistribution for
the Johnson SU distribution. |
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. |
NegativeBinomialDist | Extends the class DiscreteDistributionInt for
the negative binomial distribution with real
parameters γ and p, where
γ > 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). |
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 | Extends the class ContinuousDistribution for
the Pearson type V distribution with shape parameter
α > 0 and scale parameter β > 0. |
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. |
StudentDist | Extends the class ContinuousDistribution for
the Student-t distribution
with n degrees of freedom, where n is a positive integer. |
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]. |
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 does not generate random numbers;
for that, see the package randvar
.
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 bar(F), 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, bar(F), 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, bar(F), 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, bar(F), 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
DiscreteDistribution
and
ContinuousDistribution
(which both implement the interface
Distribution
)
for discrete and continuous distributions over the real numbers,
or DiscreteDistributionInt
,
for discrete distributions over the non-negative integers.
For example, the class
PoissonDist
extends
DiscreteDistributionInt
.
Calling a static method from this class
will compute the corresponding probability from scratch.
Constructing a PoissonDist
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, bar(F), 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
DiscreteDistributionInt.EPSILON
)
are stored in the tables. For F and bar(F), 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 using the interface
Distribution
(and sometimes
ContinuousDistribution
)
are required by some methods in the classes
GofStat
and
GofFormat
,
in package gof
.
|
SSJ V. 1.2.5. |
||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |