Hendrik van Rooyen wrote: > "Duncan Smith" <[EMAIL PROTECTED]> wrote: > > > >>Yes, if the generating processes yield numbers from different >>probability mass functions. You could simply look at the likelihood >>ratio. Otherwise, the likelihood ratio will be 1. >> > > I was thinking about the same random number generator being used in the two > disparate ways. > > - Hendrik >
The code I posted for multinomial variates repeatedly generates independent Poissons until the total is less than, or equal to, the desired total. Then the total is made up by repeatedly sampling from a discrete distribution (multinomial with n==1). If you replace the second stage by just increasing a single count by the necessary amount, then the two mass functions are clearly different. I'm not sure that I'd count this as two approaches using "the same random number generator". Duncan -- http://mail.python.org/mailman/listinfo/python-list