Distribution Operators

Distribution operators

The distribution operators discussed in this section can help you to analyze the results of an experiment. For example, it is expected that the sample mean of a sequence of observations gets closer to the mean of the distribution that was used during the observations as the number of observations increases. To compute statistics over a sample, you can use the sample operators discussed in Sample Operators or you can use the histogram functions that are explained in Creating Histograms of the Language Reference. The following distribution operators are available in AIMMS:

  • the DistributionCumulative(distr,x) operator,

  • the DistributionInverseCumulative(distr,\alpha) operator,

  • the DistributionDensity(distr,x) operator,

  • the DistributionInverseDensity(distr,\alpha) operator,

  • the DistributionMean(distr) operator,

  • the DistributionDeviation(distr) operator,

  • the DistributionVariance(distr) operator,

  • the DistributionSkewness(distr) operator, and

  • the DistributionKurtosis(distr) operator.

Cumulative distributions \(\ldots\)

DistributionCumulative(distr,x) computes the probability that a random variable \(X\) drawn from the distribution distr is less or equal than \(x\). Its inverse, DistributionInverseCumulative( distr,\alpha), computes the smallest \(x\) such that the probability that a variable \(X\) is greater than or equal to \(x\) does not exceed \(\alpha\).

\(\ldots\) and their derivatives

The DistributionDensity(distr,x) expresses the expected density around \(x\) of sample points drawn from a distr distribution and is in fact the derivative of DistributionCumulative( distr,x). The DistributionInverseDensity(distr,\alpha) is the derivative of DistributionInverseCumulative( distr,\alpha). Given a random variable \(X\), the DistributionInverseDensity can be used to answer the question of how much a given value \(x\) should be increased such that the probability \(P(X \leq x)\) is increased with \(\alpha\) (for small values of \(\alpha\)).

\(\ldots\) for discrete distributions

For continuous distributions distr, \(\alpha \in [0,1]\), and \(x = {$\texttt{DistributionInverseCumulative}$}(distr,\alpha)\), it holds that

\[\begin{split}\begin{aligned} {\texttt{DistributionDensity}}(distr,x) & = \partial \alpha / \partial x \\ {\texttt{DistributionInverseDensity}}(distr,\alpha) & = \partial x / \partial \alpha\end{aligned}\end{split}\]

Note that the above two relations make it possible to express DistributionInverseDensity in terms of DistributionDensity. Through this relation the DistributionInverseDensity is also defined for discrete distributions.

Distribution statistics

The operators DistributionMean, DistributionDeviation, DistributionVariance, DistributionSkewness and DistributionKurtosis provide the mean, standard deviation, variance, skewness and kurtosis of a given distribution. Note that the values computed using the sample operators converges to the values computed using the corresponding distribution operators as the size of the sample increases (the law of large numbers).