---
title: Gil-Pelaez Inversion Formula Overview
url: https://www.emergentmind.com/topics/gil-pelaez-inversion-formula
type: topic
---

# Gil-Pelaez Inversion Formula Overview

The Gil-Pelaez inversion formula is a Fourier-analytic technique for recovering the cumulative distribution function (CDF) and probability density function (PDF) of a real-valued random variable from its characteristic function (CF). In practical terms, it transforms knowledge of the CF, which is often easier to compute or estimate, into direct expressions for the distribution function. These formulas are fundamental in areas where distributional forms are complex or unknown, and the CF is available either empirically or in closed form, such as in actuarial compound distributions and certain randomized algorithms.

## 1. Formal Statement of the Gil-Pelaez Inversion Formulas

Let \(L\) be a real random variable with CF \(\varphi_L(t) = E[e^{i t L}]\), assumed absolutely integrable over \(\mathbb{R}\). At any continuity point \(\ell\) of the CDF \(F_L(\ell) = P\{L \leq \ell\}\), the Gil-Pelaez inversion formulas yield:

- Probability density function (PDF):
  \[
  f_L(\ell) = \frac{1}{\pi} \int_0^\infty \Re\left[ e^{-i t \ell} \varphi_L(t) \right] dt
  \tag{1}
  \]
- Cumulative distribution function (CDF):
  \[
  F_L(\ell) = \frac{1}{2} - \frac{1}{\pi} \int_0^\infty \Im\left[ e^{-i t \ell} \varphi_L(t) / t \right] dt
  \tag{2}
  \]
Here, \(\Re(z)\) and \(\Im(z)\) denote the real and imaginary parts of \(z\), respectively [1701.08299]. An alternative formulation for \(F(t)\) appears as:
\[
F(t) = \frac{1}{2} + \frac{1}{2\pi i} \int_0^\infty \frac{e^{i t \xi} \varphi_L(-\xi) - e^{-i t \xi} \varphi_L(\xi)}{\xi} d\xi
\]
as used in [2512.00632].

## 2. Theoretical Context and Derivation

The formulas arise from classic Fourier inversion for absolutely continuous distributions:
\[
f_L(\ell) = \frac{1}{2\pi}\int_{-\infty}^\infty e^{-i t \ell} \varphi_L(t) dt
\]
By decomposing this into half-line integrals and utilizing the Hermitian property \(\varphi_L(-t) = \overline{\varphi_L(t)}\), the CDF and PDF can be recovered by integrating only over \(t > 0\), leading to real-analytic integrals rather than oscillatory ones over the entire real line. Gil-Pelaez (1951) established that the CDF and PDF can be expressed as functions of real-valued integrals, making the inversion numerically tractable and stable, particularly for empirical or highly non-smooth CFs [1701.08299, 2512.00632].

## 3. Numerical Evaluation and Trapezoidal Rule Approximation

Numerical computation of the Gil-Pelaez integrals involves truncating at a large \(T\), discretizing the interval \([0, T]\) using grid points \(t_j = j \Delta\) (\(j=0,1,\dots,N\); \(\Delta = T/N\)), and applying trapezoid rule quadrature. Discretized forms are:

- PDF:
  \[
  f_L(\ell) \approx \frac{\Delta}{\pi} \sum_{j=0}^{N} w_j \Re\left[ e^{-i t_j \ell} \varphi_L(t_j) \right]
  \tag{3}
  \]
- CDF:
  \[
  F_L(\ell) \approx \frac{1}{2} - \frac{\Delta}{\pi} \sum_{j=0}^{N} w_j \Im\left[ e^{-i t_j \ell} \varphi_L(t_j) / t_j \right]
  \tag{4}
  \]

Parameter selection is controlled by the “six-sigma” rule: set the support window \([A,B] = [\mu - 6\sigma, \mu + 6\sigma]\), with \(\mu\) and \(\sigma\) obtained numerically via differentiation of \(\varphi_L\) at \(t=0\). The step size \(\Delta = 2\pi / (B - A)\) matches the range of interest to the frequency spectrum. Truncation and quadrature errors are balanced by increasing \(N\) until successive approximations stabilize below a tolerance (e.g., \(10^{-12}\)) [1701.08299].

In [2512.00632], efficient numerical approximation in high-dimensional streaming contexts utilizes a \(\tanh\)-rule variable change and exploits analyticity within horizontal strips in the complex plane to ensure fast decay and error bounds under the trapezoidal rule (see Thm. 5.1 of Trefethen & Weideman ’14).

## 4. Application Domains and Algorithmic Use Cases

The Gil-Pelaez inversion formula is central to:

- **Aggregate Loss Distribution in Actuarial Science:** The formula is pivotal for numerically inverting empirical or compound CFs to recover aggregate loss distributions and their quantiles (VaR), particularly when claim frequency and severity distributions are obtained empirically or as parametric mixtures (e.g., incorporating GPD for heavy tails) [1701.08299]. The compound CF is constructed as \(\varphi_S(t) = \varphi_N(-i \ln \varphi_X(t))\) for frequency \(N\) and severity \(X\), and inverted to yield risk measures.
- **Streaming Algorithms for Sampling:** In streaming $L_p$-sampling algorithms, the formula enables rapid simulation of tail-sum distributions arising from sums of reciprocals of powers of truncated exponential random variables. Rather than direct sampling, the Gil-Pelaez formula expresses the target CDF as a one-dimensional Fourier integral amenable to analytic quadrature, which can be executed in time \(\poly(\log n)\) per update, circumventing costly Monte Carlo sampling or brute-force hashing [2512.00632].

## 5. Implementation Details and Heuristics

Algorithmic outlines using the Gil-Pelaez formula typically involve:

1. Computing empirical CFs from observed data or parameterized models.
2. Constructing compound CFs via the formula \(\varphi_S\).
3. Precomputing grids and CF evaluations for stability.
4. Implementing the trapezoidal quadrature, adjusting grid size to meet error tolerance.
5. Interpolating or using root-finding (e.g., Newton–Raphson) methods for quantile extraction once CDF values are available.

Notable heuristics include reuse of CF computations across grid evaluations, oscillation management in integrands, and optional smoothing via multiplying the CF by a Gaussian kernel to regularize step-function CDFs derived from purely empirical CFs. For large query grids, FFT-based inversion methods are a feasible alternative when high performance is required [1701.08299].

## 6. Representative Empirical Applications

Table: Two numerical deployments from actuarial and randomized algorithms literature

| Domain                  | Task                                               | Gil-Pelaez-Driven Result                                                       |
|-------------------------|----------------------------------------------------|--------------------------------------------------------------------------------|
| Danish fire loss data   | Aggregate loss VaR estimation (insurance)          | Direct recovery of VaR$_{90\%} \approx 872.9$, VaR$_{99\%} \approx 1112.8$ via CDF inversion [1701.08299] |
| $L_p$ stream sampling   | Fast sampling of weighted tail-sums                | Polylogarithmic update time for CDF evaluation, avoiding Monte Carlo [2512.00632]       |

In actuarial applications, both non-parametric and semi-parametric (with heavy-tail mixtures) approaches show sensitivity in higher quantile estimates (e.g., VaR$_{99.9\%}$ increases from 1319.6 to 2063.3 million DKK with tail correction), illustrating the necessity of accurate inversion and tail modeling. In streaming contexts, precise CDF evaluation using the Gil-Pelaez formula is the linchpin for achieving theoretically optimal space and update times.

## 7. Computational Impact and Limitations

The Gil-Pelaez inversion formula's principal computational advantage is direct conversion of CF information into CDF and PDF estimates using numerically stable, one-dimensional real integrals. It enables non-parametric distribution estimation and facilitates heavy-tailed or compound mixtures. The main limitations arise in scenarios with discontinuous CFs or insufficient decay, potentially worsening quadrature convergence. Oscillatory integrands near singularities may necessitate supplemental smoothing or change-of-variable techniques (e.g., the \(\tanh\)-rule), as illustrated in high-precision streaming implementations [2512.00632].

A plausible implication is that while the Gil-Pelaez inversion formula is robust for many practical and empirical CFs, care must be taken with highly irregular distributions or when moment information is unavailable, as error estimation and grid design become more challenging. Its utility in separating analytic quadrature from data-driven modeling makes it a standard tool in modern statistics, actuarial science, and randomized algorithms.

Source: https://www.emergentmind.com/topics/gil-pelaez-inversion-formula