Random Harmonic Series
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).
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 for ; see the definition of below. As explained there, the functions converge to the density of the random harmonic series. We see that, at , the approximate densities are all very flat and near to and, at , the approximate densities are all near to . As explained below, the true values of the density of the random harmonic series at and are slightly smaller than and , respectively. Below the plot, we show the values of the approximate densities at ; thus, , are all , but is the first one that is slightly smaller than . We also see that there is a very small probability for or .
Recall that the usual harmonic series diverges. Following Schmuland  (see also Morrison  and Nahin [2, pp. 23–24, 229–230]), let , be independent random variables; is, for all , or , each with probability . Consider then the so-called random harmonic series . It can be shown that is a continuous random variable and the series converges almost surely. Further, although there is no theoretical upper (or lower) bound on , we have , so that the probability of a very large sum is exceedingly small; for example, and .
The density of is very flat near the origin, but actually the density does not have a flat top. Although the density is very near to at , actually the value is slightly smaller than . Also, although the density is very near to at , actually the value is slightly smaller than (the exact value is the so-called infinite cosine product integral divided by ). In the plot of the estimate of the density of , we have shown a horizontal line at and at to check how well the estimated density has these theoretical properties.
Schmuland defines to be a uniform random variable with density if , ; these variables are independent. He shows that, almost surely, . Let be the density of the partial sum . Then, converges to the density of uniformly on . The density 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 variables). Schmuland shows plots of , , and . We have calculated , , …, by inverting the characteristic function.
Schmuland shows that for , but for . Indeed, in the Demonstration we calculate that . Schmuland also shows that for , but for .
 K. E. Morrison, "Cosine Products, Fourier Transforms, and Random Sums," The American Mathematical Monthly, 102(8), 1995, pp. 716–724.
 P. J. Nahin, Digital Dice: Computational Solutions to Practical Probability Problems, Princeton, NJ: Princeton University Press, 2008.
 B. Schmuland, "Random Harmonic Series," The American Mathematical Monthly, 110(5), 2003, pp. 407–416.
 Wikipedia. "Harmonic Series (Mathematics)." (May 21, 2013) en.wikipedia.org/wiki/Harmonic_series_%28mathematics%29.