diff --git a/src/site/xdoc/userguide/distribution.xml b/src/site/xdoc/userguide/distribution.xml index b862fc4fc..ef00ba449 100644 --- a/src/site/xdoc/userguide/distribution.xml +++ b/src/site/xdoc/userguide/distribution.xml @@ -28,7 +28,16 @@

The distributions package provides a framework and implementations for some commonly used - probability distributions. + probability distributions. Continuous univariate distributions are represented by implementations of + the RealDistribution + interface. Discrete distributions implement + IntegerDistribution + (values must be mapped to integers) and there is an + EnumeratedDistribution + class representing discrete distributions with a finite, enumerated set of values. Finally, multivariate + real-valued distributions can be represented via the + MultivariateRealDistribution + interface.

An overview of available continuous distributions:
@@ -42,7 +51,8 @@ (probability(·)) and distribution functions (cumulativeProbability(·)) for both discrete (integer-valued) and continuous probability distributions. - The framework also allows for the computation of inverse cumulative probabilities. + The framework also allows for the computation of inverse cumulative probabilities + and sampling from distributions.

For an instance f of a distribution F, @@ -62,6 +72,14 @@ TDistribution t = new TDistribution(29); double lowerTail = t.cumulativeProbability(-2.656); // P(T(29) <= -2.656) double upperTail = 1.0 - t.cumulativeProbability(2.75); // P(T(29) >= 2.75) +

+ All distributions implement a sample() method to support random sampling from the + distribution. Implementation classes expose constructors allowing the default + RandomGenerator + used by the sampling algorithm to be overridden. If sampling is not going to be used, providing + a null RandomGenerator constructor argument will avoid the overhead of initializing + the default generator. +

Inverse distribution functions can be computed using the inverseCumulativeProbability methods. For continuous f