Skip to main content
Log in

A generalization of the adaptive rejection sampling algorithm

  • Published:
Statistics and Computing Aims and scope Submit manuscript


Rejection sampling is a well-known method to generate random samples from arbitrary target probability distributions. It demands the design of a suitable proposal probability density function (pdf) from which candidate samples can be drawn. These samples are either accepted or rejected depending on a test involving the ratio of the target and proposal densities. The adaptive rejection sampling method is an efficient algorithm to sample from a log-concave target density, that attains high acceptance rates by improving the proposal density whenever a sample is rejected. In this paper we introduce a generalized adaptive rejection sampling procedure that can be applied with a broad class of target probability distributions, possibly non-log-concave and exhibiting multiple modes. The proposed technique yields a sequence of proposal densities that converge toward the target pdf, thus achieving very high acceptance rates. We provide a simple numerical example to illustrate the basic use of the proposed technique, together with a more elaborate positioning application using real data.

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


  • Ali, A.M., Yao, K., Collier, T.C., Taylor, E., Blumstein, D., Girod, L.: An empirical study of collaborative acoustic source localization. In: Proceedings Information Processing in Sensor Networks, IPSN07, Boston (2007)

  • Devroye, L.: Non-uniform Random Variate Generation. Springer, Berlin (1986)

    MATH  Google Scholar 

  • Evans, M., Swartz, T.: Random variate generation using concavity properties of transformed densities. J. Comput. Graph. Stat. 7(4), 514–528 (1998)

    Article  Google Scholar 

  • Gilks, W.R.: Derivative-free adaptive rejection sampling for Gibbs sampling. Bayesian Stat. 4, 641–649 (1992)

    Google Scholar 

  • Gilks, W.R., Wild, P.: Adaptive rejection sampling for Gibbs sampling. J. R. Stat. Soc., Ser. C Appl. Stat. 41(2), 337–348 (1992)

    MATH  Google Scholar 

  • Gilks, W.R., Robert, N.G.O., George, E.I.: Adaptive direction sampling. J. R. Stat. Soc., Ser. D Stat. 43(1), 179–189 (1994)

    Google Scholar 

  • Gilks, W.R., Best, N.G., Tan, K.K.C.: Adaptive rejection metropolis sampling within Gibbs sampling. J. R. Stat. Soc., Ser. C Appl. Stat. 44(4), 455–472 (1995)

    MATH  Google Scholar 

  • Görür, D., Teh, Y.W.: Concave convex adaptive rejection sampling. Technical Report, University College, London (2009)

  • Hörmann, W.: A rejection technique for sampling from t-concave distributions. ACM Trans. Math. Softw. 21(2), 182–193 (1995)

    Article  MATH  Google Scholar 

  • Kotecha, J.H., Djurić, P.M.: Gibbs sampling approach for generation of truncated multivariate Gaussian random variables. In: Proceedings of the IEEE ICASSP, vol. 3, pp. 1757–1760 (1999)

  • Künsch, H.R.: Recursive Monte Carlo filters: Algorithms and theoretical bounds. Ann. Stat. 33(5), 1983–2021 (2005)

    Article  MATH  Google Scholar 

  • Mayo, P., Rodenas, F., Verdú, G.: Comparing methods to denoise mammographic images. In: Proceedings of the 26th IEEE EMBS, vol. 1, pp. 247–250 (2004)

  • Patwari, N., Hero, A.O., Perkins, M., Correal, N.S., O’Dea, R.J.: Relative location estimation in wireless sensor networks. IEEE Trans. Signal. Process. 51(5), 2137–2148 (2003)

    Article  Google Scholar 

  • Rappaport, T.S.: Wireless Communications: Principles and Practice, 2nd edn. Prentice-Hall, Upper Saddle River (2001)

    Google Scholar 

  • Reiss, R., Thomas, M.: Statistical Analysis of Extreme Values: With Applications to Insurance, Finance, Hydrology and Other Fields. Springer, Berlin (2007)

    MATH  Google Scholar 

  • Robert, C.P., Casella, G.: Monte Carlo Statistical Methods. Springer, Berlin (2004)

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations


Corresponding author

Correspondence to Luca Martino.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Martino, L., Míguez, J. A generalization of the adaptive rejection sampling algorithm. Stat Comput 21, 633–647 (2011).

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: