Skip to main content
Log in

Generating beta variates via patchwork rejection

Erzeugung von beta-verteilten Zufallszahlen mittels Patchwork-Verwerfung

  • Published:
Computing Aims and scope Submit manuscript

Abstract

A new algorithm for sampling from beta(p, q) distributions with parametersp>1,q>1 is developed. It is based on a method by Minh [9] which improves acceptance-rejection sampling in the main part of the distributions. Additionally, transformed uniform deviates can often be accepted immediately, so that much fewer than two uniforms are needed for one beta variate, on the average. The remaining tests for acceptance are enhanced by ‘squeezes’. Experiments covering a wide range of pairs (p, q) showed improvements in speed over competing algorithms in most cases.

Zusammenfassung

Ein neuer Algorithmus zur Erzeugung von Stichproben aus Beta(p, q)-Verteilungen mit Parameternp>1,q>1 wird entwickelt. Er basiert auf einer Methode von Minh [9], welche die Verwerfungstechnik im Hauptteil der Verteilungen verbessert. Zusätzlich können transformierte gleichverteilte Zufallszahlen oft sofort akzeptiert werden, so daß im Durchschnitt viel weniger als zwei gleichverteilte Zufallszahlen pro Beta-Stichprobe benötigt werden. Die verbleibenden Annahmetests werden durch “Squeezes” verbessert. Versuche über einen weiten (p, q)-Bereich ergaben in den meisten Fällen Geschwindigkeitssteigerungen im Vergleich zu konkurrierenden Methoden.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Ahrens, J. H., Dieter, U.: Computer methods for sampling from gamma, beta, Poisson and binomial distributions. Computing12, 223–246 (1974).

    Google Scholar 

  2. Atkinson, A. C.: A family of switching algorithms for the computer generation of beta random variables. Biometrika66, 141–145 (1979).

    Google Scholar 

  3. Atkinson, A. C., Whittaker, J.: A switching algorithm for the generation of beta random variables with at least one parameter less than 1. J. Roy. Statist. Soc. A139, 462–467 (1976).

    Google Scholar 

  4. Atkinson, A. C., Whittaker, J.: Algorithm AS 134: The generation of beta random variables with one parameter greater than one and one parameter less than 1. Applied Statistics28, 90–93 (1979).

    Google Scholar 

  5. Cheng, R. C. H.: Generating beta variates with nonintegral shape parameters. Comm. ACM21, 317–322 (1978).

    Google Scholar 

  6. Devroye, L.: Non-uniform random variate generation. Berlin, Heidelberg, New York: Springer 1986.

    Google Scholar 

  7. Dieter, U., Ahrens, J. H.: Acceptance-rejection techniques for sampling from the gamma and beta distributions. Techn. Report83, Dep. Statist., Stanford Univ., Stanford, California 1974.

    Google Scholar 

  8. Jöhnk, M. D.: Erzeugung von betaverteilten und gammaverteilten Zufallszahlen. Metrika8, 5–15 (1964).

    Google Scholar 

  9. Minh, Do Le: Generating gamma variates. ACM Trans. on Math. Software14, 261–266 (1988).

    Google Scholar 

  10. Sakasegawa, H.: Stratified rejection and squeeze method for generating beta random numbers. Ann. Inst. Statist. Math.35, 291–302 (1983).

    Google Scholar 

  11. Schmeiser, B. W., Babu, A. J. G.: Beta variate generation via exponential majorizing functions. Oper. Research28, 917–926 (1980). (Errata: Oper. Research,31, 802, 1983).

    Google Scholar 

  12. Stadlober, E., Kremer, R.: Sampling from discrete and continuous distributions with C-rand. In: Pflug, G., Dieter, U. (eds.) Simulation and Optimization, pp. 154–162, 1992 (Springer Lecture Notes Econom. Math. Systems371).

Download references

Author information

Authors and Affiliations

Authors

Additional information

Dedicated to Professor Ulrich Dieter on the occasion of his 60th birthday

This research was supported by the Austrian Research Council (Fonds zur Förderung der wissenschaftlichen Forschung Nr. P8257-PHY).

Rights and permissions

Reprints and permissions

About this article

Cite this article

Zechner, H., Stadlober, E. Generating beta variates via patchwork rejection. Computing 50, 1–18 (1993). https://doi.org/10.1007/BF02280036

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF02280036

AMS Subject Classifications

Key words and Phrases

Navigation