A fast and simple algorithm for finding the modes of a multinomial distribution

作者:White W T J*; Hendy M D
来源:Statistics & Probability Letters, 2010, 80(1): 63-68.
DOI:10.1016/j.spl.2009.09.013

摘要

Suppose a trial has r possible outcomes, with the i-th outcome having probability p(i), Sigma(r)(i=1) pi = 1 and p = (p(1), ..., p(r)). The outcome of n independent trials can be described by the frequencies k = (k(1), ..., k(r)), Sigma(r)(i=1) k(i) = n, where outcome i was selected with frequency k(i) is an element of N. A mode (there can be multiple modes) is an outcome with maximal likelihood over all possible outcomes.
Despite the ubiquity of multinomial distributions in statistical applications, the best algorithm to date for finding modes has unknown computational complexity and highly variable performance in practice. It is also vulnerable to precision problems due to accumulated roundoff error.
We propose a new algorithm, GreedyModeFind, for calculating the mode(s) of this distribution, given n and p. GreedyModeFind is simple, efficient and numerically robust, requiring O(r log r) time and O(r) space to find one mode. A concise representation of the full set of joint modes can be found for an additional time cost of O(r log r). In practice this algorithm drastically improves on the performance of earlier algorithms. We provide a freely available C++ implementation of GreedyModeFind.

  • 出版日期2010-1

全文