{"title":"论开源二项式随机变量生成算法的平均运行时间","authors":"Vincent A. Cicirello","doi":"arxiv-2403.11018","DOIUrl":null,"url":null,"abstract":"The BTPE algorithm (Binomial, Triangle, Parallelogram, Exponential) of\nKachitvichyanukul and Schmeiser is one of the faster and more widely utilized\nalgorithms for generating binomial random variates. Cicirello's open source\nJava library, $\\rho\\mu$, includes an implementation of BTPE as well as a\nvariety of other random number related utilities. In this report, I explore the\naverage case runtime of the BTPE algorithm when generating random values from\nbinomial distribution $B(n,p)$. Beginning with Kachitvichyanukul and\nSchmeiser's formula for the expected number of acceptance-rejection sampling\niterations, I analyze the limit behavior as $n$ approaches infinity, and show\nthat the average runtime of BTPE converges to a constant. I instrument the open\nsource Java implementation from the $\\rho\\mu$ library to experimentally\nvalidate the analysis.","PeriodicalId":501256,"journal":{"name":"arXiv - CS - Mathematical Software","volume":"54 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-03-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"On the Average Runtime of an Open Source Binomial Random Variate Generation Algorithm\",\"authors\":\"Vincent A. Cicirello\",\"doi\":\"arxiv-2403.11018\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"The BTPE algorithm (Binomial, Triangle, Parallelogram, Exponential) of\\nKachitvichyanukul and Schmeiser is one of the faster and more widely utilized\\nalgorithms for generating binomial random variates. Cicirello's open source\\nJava library, $\\\\rho\\\\mu$, includes an implementation of BTPE as well as a\\nvariety of other random number related utilities. In this report, I explore the\\naverage case runtime of the BTPE algorithm when generating random values from\\nbinomial distribution $B(n,p)$. Beginning with Kachitvichyanukul and\\nSchmeiser's formula for the expected number of acceptance-rejection sampling\\niterations, I analyze the limit behavior as $n$ approaches infinity, and show\\nthat the average runtime of BTPE converges to a constant. I instrument the open\\nsource Java implementation from the $\\\\rho\\\\mu$ library to experimentally\\nvalidate the analysis.\",\"PeriodicalId\":501256,\"journal\":{\"name\":\"arXiv - CS - Mathematical Software\",\"volume\":\"54 1\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-03-16\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"arXiv - CS - Mathematical Software\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/arxiv-2403.11018\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Mathematical Software","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2403.11018","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
On the Average Runtime of an Open Source Binomial Random Variate Generation Algorithm
The BTPE algorithm (Binomial, Triangle, Parallelogram, Exponential) of
Kachitvichyanukul and Schmeiser is one of the faster and more widely utilized
algorithms for generating binomial random variates. Cicirello's open source
Java library, $\rho\mu$, includes an implementation of BTPE as well as a
variety of other random number related utilities. In this report, I explore the
average case runtime of the BTPE algorithm when generating random values from
binomial distribution $B(n,p)$. Beginning with Kachitvichyanukul and
Schmeiser's formula for the expected number of acceptance-rejection sampling
iterations, I analyze the limit behavior as $n$ approaches infinity, and show
that the average runtime of BTPE converges to a constant. I instrument the open
source Java implementation from the $\rho\mu$ library to experimentally
validate the analysis.