# Reconditioning your quantile function

**Authors:** Keith Pedersen

arXiv: 1704.07949 · 2018-02-16

## TL;DR

This paper addresses the numerical instability in the inversion method for generating random samples from distributions, introducing a robust reconditioning technique and providing an open-source implementation in pqRand.

## Contribution

It proposes a novel reconditioning approach for the quantile function to improve numerical stability in Monte Carlo simulations, with a practical software package available.

## Key findings

- Enhanced accuracy in tail sampling for various distributions
- Open-source pqRand package implements the proposed method
- Improved robustness of Monte Carlo simulations in nonlinear systems

## Abstract

Monte Carlo simulation is an important tool for modeling highly nonlinear systems (like particle colliders and cellular membranes), and random, floating-point numbers are their fuel. These random samples are frequently generated via the inversion method, which harnesses the mapping of the quantile function Q(u) (e.g. to generate proposal variates for rejection sampling). Yet the increasingly large sample size of these simulations makes them vulnerable to a flaw in the inversion method; Q(u) is ill-conditioned in a distribution's tails, stripping precision from its sample. This flaw stems from limitations in machine arithmetic which are often overlooked during implementation (e.g. in popular C++ and Python libraries). This paper introduces a robust inversion method, which reconditions Q(u) by carefully drawing and using uniform variates. pqRand, a free C++ and Python package, implements this novel method for a number of popular distributions (exponential, normal, gamma, and more).

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1704.07949/full.md

## Figures

7 figures with captions in the complete paper: https://tomesphere.com/paper/1704.07949/full.md

## References

23 references — full list in the complete paper: https://tomesphere.com/paper/1704.07949/full.md

---
Source: https://tomesphere.com/paper/1704.07949