Random Harmonic Series

​
upper bound of sum
100
simulated sums
10000
new simulation
1
bin for histogram
0.2
bandwidth for density
0.2
show approximate densities
g
n
n
0
1
2
3
4
5
6
7
all 8
Multiply each term in the harmonic series by a plus or minus sign, which was randomly chosen by flipping a fair coin. The result is a random variable called the random harmonic series. In this Demonstration, we approximate the density of the random harmonic series by simulation. The original infinite sum is replaced by a finite sum, and such a sum is calculated at least ten thousand times. The Demonstration shows a histogram of the values of the sums and a kernel density estimate. The Demonstration can also show a series of special approximate densities (see Details).

Details

Snapshot 1: too small a bandwidth for the kernel density estimate yields an estimate that varies too much
Snapshot 2: too large a bandwidth for the kernel density estimate yields an estimate that is too smooth
Snapshot 3: This plot shows
g
i
for
i=0,1,…,7
; see the definition of
g
i
below. As explained there, the functions
g
i
converge to the density of the random harmonic series. We see that, at
x=0
, the approximate densities are all very flat and near to
1/4=0.25
and, at
x=±2
, the approximate densities are all near to
1/8=0.125
. As explained below, the true values of the density of the random harmonic series at
x=0
and
x=±2
are slightly smaller than
1/4
and
1/8
, respectively. Below the plot, we show the values of the approximate densities at
x=±2
; thus,
g
i
,
i=0,…,6
are all
1/4
, but
g
7
is the first one that is slightly smaller than
1/4
. We also see that there is a very small probability for
x<-4
or
x>4
.
Recall that the usual harmonic series
∞
∑
i=1
1/i
diverges. Following Schmuland[3] (see also Morrison[1] and Nahin[2, pp. 23–24, 229–230]), let
ε
i
,
i=1,2,…
be independent random variables;
ε
i
is, for all
i
,
1
or
-1
, each with probability
1/2
. Consider then the so-called random harmonic series
X=
∞
∑
i=1
ε
i
/i
. It can be shown that
X
is a continuous random variable and the series converges almost surely. Further, although there is no theoretical upper (or lower) bound on
X
, we have
P(X>x)≤exp(-3
2
x
/
2
π
)
, so that the probability of a very large sum is exceedingly small; for example,
P(x>4)≤0.0077
and
P(X>5)≤0.0005
.
The density
g(x)
of
X
is very flat near the origin, but actually the density does not have a flat top. Although the density is very near to
1/4
at
x=0
, actually the value is slightly smaller than
1/4
. Also, although the density is very near to
1/8
at
x=±2
, actually the value is slightly smaller than
1/8
(the exact value is the so-called infinite cosine product integral divided by
π
). In the plot of the estimate of the density of
X
, we have shown a horizontal line at
1/4
and at
1/8
to check how well the estimated density has these theoretical properties
​
.
Schmuland defines
U
i
to be a uniform random variable with density
(2i+1)/4
if
-2/(2i+1)≤x≤2/(2i+1)
,
i=0,1,…
; these variables are independent. He shows that, almost surely,
X=
∞
∑
i=0
U
i
. Let
g
n
be the density of the partial sum
U
0
+
U
1
+…+
U
n
. Then,
g
n
converges to the density
g
of
X
uniformly on

. The density
g
n
can be calculated either by convolutions or by inverting the characteristic function of the partial sum (which is the product of the characteristic functions of the corresponding
U
i
variables). Schmuland shows plots of
g
0
,
g
1
, and
g
2
. We have calculated
g
0
,
g
1
, …,
g
7
by inverting the characteristic function.
Schmuland shows that
g
n
(0)=1/4
for
n=0,…,6
, but
g
n
(0)<1/4
for
n≥7
. Indeed, in the Demonstration we calculate that
g
7
(0)=0.24999999999632342966…
. Schmuland also shows that
g
n
(2)=1/8
for
n=0,…,56
, but
g
n
(2)<1/8
for
n≥57
.

References

[1] K. E. Morrison, "Cosine Products, Fourier Transforms, and Random Sums," The American Mathematical Monthly, 102(8), 1995, pp. 716–724.
[2] P. J. Nahin, Digital Dice: Computational Solutions to Practical Probability Problems, Princeton, NJ: Princeton University Press, 2008.
[3] B. Schmuland, "Random Harmonic Series," The American Mathematical Monthly, 110(5), 2003, pp. 407–416.
[4] Wikipedia. "Harmonic Series (Mathematics)." (May 21, 2013) en.wikipedia.org/wiki/Harmonic_series_%28mathematics%29.

External Links

Infinite Cosine Product Integral (Wolfram MathWorld)

Permanent Citation

Heikki Ruskeepää
​
​"Random Harmonic Series"​
​http://demonstrations.wolfram.com/RandomHarmonicSeries/​
​Wolfram Demonstrations Project​
​Published: May 28, 2013