In article <011301c1d93c$de7d3fe0$fc4434d9@usama1>, osama <[EMAIL PROTECTED]> wrote: >This is a multi-part message in MIME format.
>Hallo; > Do you know of a fast algorithm to generate random numbers from a discr= >ete distribution? I am looking for a disrtibution with pmf =3Dx^a p^x/c >Does any of the avaliable stat package do this? I know some reasonably fast ways to do this; whether they are in the literature I do not know. Some questions need to be taken into account for this, however: 1. What types of values of p and a are you considering? For example, a > 0 and a < 0 behave quite differently. Also, p near 1 and p not near 1, likewise, with p = .5 being an exceptionally easy case. 2. How many cases are being done with given a and p? 3. How costly are the input random variables? If you are worried about how many bits are used, the problem is quite different from that if only floating point numbers are used. -- This address is for information only. I do not claim that these views are those of the Statistics Department or of Purdue University. Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399 [EMAIL PROTECTED] Phone: (765)494-6054 FAX: (765)494-0558 . . ================================================================= Instructions for joining and leaving this list, remarks about the problem of INAPPROPRIATE MESSAGES, and archives are available at: . http://jse.stat.ncsu.edu/ . =================================================================
