Adaptive truncation of infinite sums: applications to Statistics

Luiz Max Carvalho, Wellington J. Silva, Guido A. Moreira
2/12/2022
stat.MEstat.APstat.CO
bayesian

Official code: maxbiostat/COMP_Stan (2 stars, R, GPL-2.0, last commit 2022-05-21). 1 more implementation below.

Abstract

It is often the case in Statistics that one needs to compute sums of infinite series, especially in marginalising over discrete latent variables. This has become more relevant with the popularization of gradient-based techniques (e.g.

Show full abstract

Hamiltonian Monte Carlo) in the Bayesian inference context, for which discrete latent variables are hard or impossible to deal with. For many commonly used infinite series, custom algorithms have been developed which exploit specific features of each problem. General techniques, suitable for a large class of problems with limited input from the user are less established. We employ basic results from the theory of infinite series to investigate general, problem-agnostic algorithms to truncate infinite sums within an arbitrary tolerance $\varepsilon > 0$ and provide robust computational implementations with provable guarantees. We compare three tentative solutions to estimating the infinite sum of interest: (i) a "naive" approach that sums terms until the terms are below the threshold $\varepsilon$; (ii) a `bounding pair' strategy based on trapping the true value between two partial sums; and (iii) a `batch' strategy that computes the partial sums in regular intervals and stops when their difference is less than $\varepsilon$. We show under which conditions each strategy guarantees the truncated sum is within the required tolerance and compare the error achieved by each approach, as well as the number of function evaluations necessary for each one. A detailed discussion of numerical issues in practical implementations is also provided. The paper provides some theoretical discussion of a variety of statistical applications, including raw and factorial moments and count models with observation error. Finally, detailed illustrations in the form noisy MCMC for Bayesian inference and maximum marginal likelihood estimation are presented.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
maxbiostat/COMP_StanOfficial2RGPL-2.02022-05-21
maxbiostat/truncation_testsOfficial2RGPL-3.02022-02-15
GPL-2.0

Implementing the Conway-Maxwell Poisson distribution in Stan.

21R, StanMar 14, 20214 years agoGPL-2.0
stanstatisticstruncation
GPL-3.0

Preliminary code to test truncation algorithms for infinite series and their applications in Statistics.

21R, StanFeb 23, 20214 years agoGPL-3.0
mathematicsstatisticssummationtruncation

Similar Papers

Cite this paper

@article{carvalho2022adaptive,
  title  = {Adaptive truncation of infinite sums: applications to Statistics},
  author = {Luiz Max Carvalho and Wellington J. Silva and Guido A. Moreira},
  year   = {2022},
  eprint = {2202.06121},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2202.06121}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2202.06121.svg)](https://codeofpaper.com/paper/2202.06121)

Discussion