首页    期刊浏览 2024年10月06日 星期日
登录注册

文章基本信息

  • 标题:The Monty Python Method for Generating Gamma Variables
  • 本地全文:下载
  • 作者:George Marsaglia ; Wai Wan Tsang
  • 期刊名称:Journal of Statistical Software
  • 印刷版ISSN:1548-7660
  • 电子版ISSN:1548-7660
  • 出版年度:1999
  • 卷号:3
  • 期号:1
  • 页码:1-8
  • 语种:English
  • 出版社:University of California, Los Angeles
  • 摘要:The Monty Python Method for generating random variables takes a decreasing density, cuts it into three pieces, then, using area-preserving transformations, folds it into a rectangle of area 1. A random point (x,y) from that rectangle is used to provide a variate from the given density, most of the time as itself or a linear function of x . The decreasing density is usually the right half of a symmetric density. The Monty Python method has provided short and fast generators for normal, t and von Mises densities, requiring, on the average, from 1.5 to 1.8 uniform variables. In this article, we apply the method to non-symmetric densities, particularly the important gamma densities. We lose some of the speed and simplicity of the symmetric densities, but still get a method for γ α variates that is simple and fast enough to provide beta variates in the form γ a /(γ a +γ b ). We use an average of less than 1.7 uniform variates to produce a gamma variate whenever α ≥ 1 . Implementation is simpler and from three to five times as fast as a recent method reputed to be the best for changing α's.
国家哲学社会科学文献中心版权所有