In this chapter we give an introduction to univariate statistical distributions, their properties and some initial applications. We focus on the C++ <random> library and the Boost Statistics library. The advantage of this approach in our opinion lies in the fact that we use standardised and de-facto standard libraries. The main topics are:
Much of the flexibility of the code can be attributed to features that C++ supports, for example variadic parameters, tuples and template–template parameters. We also introduce the Command design pattern (GOF, 1995) in the context of callback functions and event triggering mechanisms.
The error function (also called the Gaussian error function) is defined by:
In statistics this function has the following interpretation: let X be a normally distributed random variable with mean 0 and variance 1/2. Then erf(x) describes the probability of X falling in the ...