Helper Utilities
Helper Utilities
Given a sequence of moments, how do we recover the corresponding distribution?
For density in (0..1) this is known as the Hausdorff moment problem (wikipedia) and you can get other densities after rescaling.
For example central binomial coefficients rescaled by give us the ArcSin distribution.
For density in (0..1) this is known as the Hausdorff moment problem (wikipedia) and you can get other densities after rescaling.
For example central binomial coefficients rescaled by
-n
4
In[]:=
dist=ArcSinDistribution[];Plot[PDF[dist,x],{x,-1/2,1+1/2},PlotLabel->"ArcSin density"]
Out[]=
Out[]//TableForm=
n=1 | 1 2 | 1 2 |
n=2 | 3 8 | 3 8 |
n=3 | 5 16 | 5 16 |
A number of famous sequence correspond to moments of some distribution: Catalan numbers, Motzkin Numbers, Riordan Numbers.
Density corresponding to moments/n! was recently shown to correspond to a certain limiting distribution, and it comes up in practice when multiplying many large projection matrices together (mathoverflow discussion with Carlo Beenakker)
Density corresponding to moments
n
n
Several methods exist for obtaining the density given a sequence of moments:
- Stieltjes-Perron inversion formula
- Inverse Laplace Transform
- Hilbert Transform
The connections between these can be seen in the following diagram
- Stieltjes-Perron inversion formula
- Inverse Laplace Transform
- Hilbert Transform
The connections between these can be seen in the following diagram
We have three distinct ways of looking at this problem, arranged in columns:
- Random Variable view: Moment Generating Function (MGF) and Stieltjes transform of random variable X
- Density view: Laplace transform and double Laplace Transform of the density of X
- Sequence view: exponential generating function (EGF) and ordinary generating function (OGF) of the sequence of moments
- Random Variable view: Moment Generating Function (MGF) and Stieltjes transform of random variable X
- Density view: Laplace transform and double Laplace Transform of the density of X
- Sequence view: exponential generating function (EGF) and ordinary generating function (OGF) of the sequence of moments
Entries on the same row are related by simple algebra which you can see in this table of quantities for Beta(1/2,1) distribution
Out[]//TableForm=
R.V. | Density | Sequence | |
Time Domain | π Erf[-t ]2 -t | π Erf[t1 ]2 t1 | π Erf[-t ]2 -t |
Frequency Domain | - ArcTan 1 -z -z | ArcTan 1 z1 z1 | ArcTan[ -s ]-s |
We can chain the arrows together to form 4 general algebraic approaches. Consider Uniform(0,1) density with moments . We can chain together OGF/EGF with inverse Laplace, double Inverse Laplace, and inverse Stieltjes. The latter can be performed using Stieltjes-Perron Inversion formula or using Hilbert Transform.
1
1+n
Inverse methods
Inverse methods
Inverse Laplace
Inverse Laplace
Consider the following sequence of moments
In[]:=
expr=;DiscretePlot[expr,{n,1,5},AxesLabel->{"n"},PlotLabel->pretty[expr],AxesOrigin->{0,0}]
1
1+2n
Out[]=
Obtain the ordinary generating function of the moment sequence, putting us in row 3, column 3 of the table
In[]:=
col3row3=GeneratingFunction,n,s
1
2n+1
Out[]=
ArcTanh[
s
]s
Now move one column left using algebra
In[]:=
col2row3=col3row3/.s->;col2row3=Assuming[{z1>1},Simplify@col2row3]
1
z1
-1
z1
Out[]=
ArcTan
1
z1
z1
Move one row up by performing inverse Laplace Transform
In[]:=
InverseLaplaceTransform,z1,t1
ArcTan
1
z1
z1
Out[]=
π
Erf[t1
]2
t1
Another Inverse Laplace Transform recovers Beta(1/2,1) density
In[]:=
Assuming{t1>0,0<x<1},InverseLaplaceTransform,t1,x//Simplify
π
Erf[t1
]2
t1
Out[]=
1
2
x
Alternatively, we could’ve computed exponential generating function, in which case only a single inverse Laplace Transform would be required
Stieltjes-Perron Inversion Formula
Stieltjes-Perron Inversion Formula
We can extract the density from the height of branch cut along the support, as you can see in the Stieltjes transform of the UniformDistribution[0,1]
Perform a re-arrangement to get the Stieltjes transform
You can overlap with Beta(1/2,1) density to ensure it’s the same distribution
Hilbert Transform
Hilbert Transform
Sokhotski–Plemelj theorem links inverse Stieltjes Transform with Hilbert Transform.
Consider Stieltjes transform of the Beta(1/2,1) distribution
Integrate this expression numerically
References
References
- Theorem 2.2 in “Computing Inverses of Stieltjes Transforms of Probability Measures” Chen/Olver https://arxiv.org/abs/2410.16178
- Inverse Stieltjes Transform discussion (community, mathematica.SE answer)
- Scratch (notebook and notability)
- Inverse Stieltjes Transform discussion (community, mathematica.SE answer)
- Scratch (notebook and notability)
CITE THIS NOTEBOOK
CITE THIS NOTEBOOK
Hausdorff moment problem: recovering density from moments in Wolfram
by Yaroslav Bulatov
Wolfram Community, STAFF PICKS, June 6, 2025
https://community.wolfram.com/groups/-/m/t/3475415
by Yaroslav Bulatov
Wolfram Community, STAFF PICKS, June 6, 2025
https://community.wolfram.com/groups/-/m/t/3475415