Previous | Table of Contents | Next |
Question: Why did you use the Gaussian assumption?
Answer. Because its the normal assumption!
Overheard at a conference.
S. Pasupathy (1989)
This chapter describes the random-number generation algorithms for distributions commonly used by computer systems performance analysts. This chapter is organized in a manner convenient for future reference. The distributions are listed in an alphabetic order. For each distribution, the key characteristics are summarized, algorithms for random-number generation are presented, and examples of their applications are given.
The Bernoulli distribution is the simplest discrete distribution. A Bernoulli variate can take only two values, which are usually denoted as failure and success or x = 0 and x = 1, respectively. If p denotes the probability of success, 1 p is the probability of failure. The experiments to generate a Bernoulli variate are called Bernoulli trials.
The key characteristics of the Bernoulli distribution are summarized in Table 29.1. The Bernoulli distribution is used to model the probability of an outcome having a desired class or characteristic, for example,
TABLE 29.1 Bernoulli Distribution Bernoulli(p)
The Bernoulli distribution and its derivative distributions can be used only if the trials are independent and identical so that the probability of success in each trial is p and is not affected by the outcomes of the past trials.
Using inverse transformation, Bernoulli variates can be generated as follows. Generate u~U(0, 1). If u≤p, return 0. Otherwise, return 1.
The beta distribution is used to represent random variates that are bounded, for instance, between 0 and 1. The key characteristics of the beta distribution are summarized in Table 29.2.
TABLE 29.2 Beta Distribution beta(a,b)The range of the beta variate as defined in Table 29.2 is [0, 1], that is, 0 ≤ x ≤ 1. It can also be defined for any other range [xmin, xmax] by substituting (x xmin) / (xmax xmin) in place of x in the pdf specified.
The beta distribution is used to model random proportions, for example,
Beta variates can be generated as follows:
The number of successes x in a sequence of n Bernoulli trials has a binomial distribution. The key characteristics of the binomial distribution are summarized in Table 29.3.
TABLE 29.3 Binomial Distribution binomial(p,n)
The binomial distribution is used to model the number of successes in a sequence of n independent and identical Bernoulli trials, for example,
The variance of the binomial distribution is always less than the mean. For all the preceding applications, negative binomial or Poisson distributions can be used in place of a binomial distribution if the variance is greater than the mean or equal to the mean, respectively.
Binomial variates can be generated as follows:
Previous | Table of Contents | Next |