3.4.1 NUMERICAL DISTRIBUTIONS 119 Fig. 9. The density (Freelance web design)

3.4.1 NUMERICAL DISTRIBUTIONS 119 Fig. 9. The density function divided into 31 parts. The area of each part represents the average number of times a random number with that density is to be computed. probability pj is very small in this ease. Most of the distributions F,(s) will be quite easy to accommodate, since they will be trivial modifications of the uniform distribution. The resulting method yields an extremely efficient program, since its average running time is very small. It is easier to understand the method if we work with the derivatives of the distributions instead of the distributions themselves. Let f(x) = F (x), fj(X) = Q (x); these are called the density functions of the probability distributions. Equation (13) b ecomes f(z) = Plflcz) + Pz.fi(Z) + . . . + Pnfn(X). (14) Each f?(z) is > 0, and the total area under the graph of f,(z) is 1; so there is a convenient graphical way to display the relation (14): The area under f(z) is divided into n parts, with the part corresponding to fj(z) having area pj. See Fig. 9, which illustrates the situation in the case of interest to us here, with f(x) = F (x) = me-z2/2; the area under this curve has been divided into n = 31 parts. There are 15 rectangles, which represent plfl(z), . . . , p15fl5(z); there are 15 wedge-shaped pieces, which represent p,sf,s(s), . . . , psofso(z); :md the remaining part pslfsl(z) is the tail, namely the entire graph of f(z) for x 2 3. The rectangular parts fl(x), . . . , f15 ( X) represent uniform distributions. For example, fs(x) represents a random variable uniformly distributed between 3 and 3. The altitude of pjf,(x) is f(j/5), hence the area of the jth rectangle is pj = if(j/5) = & e–j2/50, for 1 < j 5 15. (15) i

Leave a Reply