1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
Before the statistical distributions and accompanying random number
generators can be used the tthi(random) header file must be included.
The STL offers several standard mathematical (statistical)
distributions. These distributions allow programmers to obtain randomly
selected values from a selected distribution.
These statistical distributions need to be provided with a random number
generating object. Several of such random number generating objects are
provided, extending the traditional ti(rand) function that is part of the
bf(C) standard library.
These random number generating objects produce pseudo-random numbers, which
are then processed by the statistical distribution to obtain values that are
randomly selected from the specified distribution.
Although the STL offers various statistical distributions their functionality
is fairly limited. The distributions allow us to obtain a random number from
these distributions, but
i(probability density function)s
or
i(cumulative distribution function)s
are currently not provided by the STL. These functions (distributions as well
as the density and the cumulative distribution functions) are, however,
available in other libraries, like the
turl(boost math library)(http://www.boost.org/) (specifically:nl()
lurl(http://www.boost.org/doc/libs/1_44_0/libs/math/doc/sf_and_dist/\
html/index.html)).
It is beyond the scope of the annotations() to discuss the mathematical
characteristics of the various statistical distributions. The interested
reader is referred to the pertinent mathematical textbooks (like Stuart and
Ord's (2009)
hi(Stuart, A. & Ord, K)
emi(Kendall's Advanced Theory of Statistics), Wiley) or to web-locations
like lurl(http://en.wikipedia.org/wiki/Bernoulli_distribution).
|