This is yet to be written. Any contributions will be greatfully accepted!
This is yet to be written. Any contributions will be gratefully accepted!
This is yet to be written. Any contributions will be gratefully accepted!
This is yet to be written. Any contributions will be gratefully accepted!
This is yet to be written. Any contributions will be gratefully accepted!
The distribution framework provides the means to compute probability density function (PDF) probabilities and cumulative distribution function (CDF) probabilities for common probability distributions. Along with the direct computation of PDF and CDF probabilities, the framework also allows for the computation of inverse PDF and inverse CDF values.
In order to use the distribution framework, first a distribution object must
be created. It is encouraged that all distribution object creation occurs via
the org.apache.commons.math.stat.distribution.DistributionFactory
class. DistributionFactory
is a simple factory used to create all
of the distribution objects supported by Commons-Math. The typical usage of
DistributionFactory
to create a distribution object would be:
The distributions that can be instantiated via the DistributionFactory
are detailed below:
Distribution | Factory Method | Parameters |
---|---|---|
Binomial | createBinomialDistribution | Number of trials Probability of success |
Chi-Squared | createChiSquaredDistribution | Degrees of freedom |
Exponential | createExponentialDistribution | Mean |
F | createFDistribution | Numerator degrees of freedom Denominator degrees of freedom |
Gamma | createGammaDistribution | Alpha Beta |
Hypergeometric | createHypogeometricDistribution | Population size Number of successes in population Sample size |
t | createTDistribution | Degrees of freedom |
Using a distribution object, PDF and CDF probabilities are easily computed
using the cummulativeProbability
methods. For a distribution X
,
and a domain value, x
, cummulativeProbability
computes
P(X <= x)
(i.e. the lower tail probability of X
).
The inverse PDF and CDF values are just as easily computed using the
inverseCummulativeProbability
methods. For a distribution X
,
and a probability, p
, inverseCummulativeProbability
computes the domain value x
, such that:
P(X <= x) = p
, for continuous distributionsP(X <= x) <= p
, for discrete distributions