Toolbox

- probability density(mass) function (pdf,pmf)
- cumulative distribution function (cdf)
- inverse
- graph of pdf/pmf and cdf
- random number generator (rng)

Probability Distribution Functions

 Distribution type threshold non centrality order statistic Beta continuous X X Cauchy continuous X Chi2 continuous X X Exponential continuous X X F continuous X X Gamma continuous X X X Gumbel continuous X Laplace continuous X Logistic continuous X LogLogistic continuous X X LogNormal continuous X X Normal continuous X t continuous X X triangular continuous X Uniform continuous X Weibull continuous X X geometric discrete binomial discrete negative binomial discrete poisson discrete hypergeometric discrete neg. hypergeometric discrete Gamma-Poisson mixed Beta-Binomial mixed Beta-NegativeBinomial mixed

Random Number Generator

- Law, A. M. and Kelton, W. D., Simulation Modeling and Analysis, McGraw-Hill pp. 430
- Brian Wichman, David Hill, Algorithm AS 183 (Excel's RAND-Function)
- Pierre L'Ecuyer,Communications of the ACM, Volume 31, No. 6, June 1988, pp. 742-751
- VBA's RND-function

Options

- show formular of distribution function in user form
- input parameter value via keyboard or from worksheet (click onto cell in worksheet containing the value then double click textfield in userform)
- output results to message box or worksheet
- input/output a range of percentile (or cum. probability) values from/to worksheet

- generate graphs of pdf/pmf (left vertical axis) and cdf (right vertical axis). The colored area under the pdf is generated by laying a shape over the chart.
Changing the min/max axis causes a missfit of shape and chart. The sub to generate the shape can be found on Jon Peltier's website. See Links.

- define a SEED (starting value) for the rng. If a seed is defined the same set of random numbers will be generated each time the procedure is executed. If SEED is empty
a new set of random numbers will be generated.
- generate integer values 1,2,3,...,n in a random order

Details

- Threshold (δ): lower limit for skewed (tail to the right) distributions. Can take negative values. Allows to shift distribution "away" from 0.
- Non Centrality Parameter (θ): additional parameter to change shape of distribution
- Order Statistics: determines pdf/cdf/inverse of the r-th smallest of n random variables all following the predefined distribution

- Inverse transform sampling is used to generate random numbers following a predefined distribution

- For the non central t-distribution accuracy tends to be poor if the percentile is negative

Examples

Input userform with formulars, result to messagebox Input range of values from worksheet and Output results to worksheet pdf/cdf of beta distribution with predefined parameter values pmf/cdf of beta binomial distribution with predefined parameter values Random Numbers generated with WELL512a that follow a Weibull distribution with predefined parameter values Random Integers generated with MT19937 