Write . The target Poisson distribution and proposal geometric distribution have probability mass functions and . Their ratio isThe successive ratio shows that a maximizing integer is , with a tie at when is an integer. Thus the tight envelope isFor any fixed , draw using (ii)'s inversion formula with this new parameter, and draw an independent from the uniform distribution on . Accept whenotherwise restart. The acceptance probability is and the expected number of proposals is .
To minimize that expected count, set . The exact answer isHere is a proof that includes the changes of maximizing integer. Each is a convex function of , since its second derivative is . Their pointwise maximum is also a convex function. When is fixed its derivative isIf , take , where changes from on the left to on the right. The left derivative is nonpositive because ; the right derivative is nonnegative because . This is a minimum. If , take . There and the active branch has except for the endpoint tie; its derivative vanishes. Convexity again proves the global minimum. The formulas agree at the boundary.
For a fully specified optimal algorithm, compute and once, then use the preceding acceptance test with and . At an integer tie either maximizing integer gives the same test. In code, factorials can be evaluated through the logarithm of the gamma function:and acceptance is . This avoids overflowing factorials.
The optimum minimizes expected trials, the usual idealization of time when each proposal and test has constant cost. Actual runtime also depends on the implementation of discrete inversion and factorial evaluation. Simply minimizing an upper bound for would not necessarily give the exact optimum above; see optimal geometric envelope for a Poisson distribution.
Articles by others on the same topic
There are currently no matching articles.