# Law of the iterated logarithm

In probability theory, the law of the iterated logarithm describes the magnitude of the fluctuations of a random walk. The original statement of the law of the iterated logarithm is due to A. Ya. Khinchin (1924). Another statement was given by A. N. Kolmogorov in 1929.

## Statement

Let {Y$_n$} be independent, identically distributed random variables with zero means and unit variances. Let S$_n$ = Y$_1$ + ... + Y$_n$. Then
    $\limsup _{n\to \infty }{\frac {|S_{n}|}{\sqrt {2n\log \log n}}}=1\quad {\text{a.s.}},$
where "log" is the natural logarithm, "lim sup" denotes the limit superior, and "a.s." stands for "almost surely".
Another statement given by A. N. Kolmogorov in 1929 is as follows.
Let $\{Y_{n}\}$ be independent random variables with zero means and finite variances. Let $S_{n}=Y_{1}+\dots +Y_{n}$ and $B_{n}=\operatorname {Var} (Y_{1})+\dots +\operatorname {Var} (Y_{n})$. If $B_{n}\to \infty$ and there exists a sequence of positive constants $\{M_{n}\}$ such that $|Y_{n}|\leq M_{n}$ a.s. and
    $M_{n}\;=\;o\left({\sqrt {\frac {B_{n}}{\log \log B_{n}}}}\right),$
then we have
    $\limsup _{n\to \infty }{\frac {|S_{n}|}{\sqrt {2B_{n}\log \log B_{n}}}}=1\quad {\text{a.s.}}$
Note that, the first statement covers the case of the standard normal distribution, but the second does not.

## Discussion

The law of iterated logarithms operates "in between" the law of large numbers and the central limit theorem. There are two versions of the law of large numbers — the weak and the strong — and they both state that the sums S$_n$, scaled by n$^{−1}$, converge to zero, respectively in probability and almost surely:
    ${\frac {S_{n}}{n}}\ {\xrightarrow {p}}\ 0,\qquad {\frac {S_{n}}{n}}\ {\xrightarrow {a.s.}}0,\qquad {\text{as}}\ \ n\to \infty .$
On the other hand, the central limit theorem states that the sums S$_n$ scaled by the factor n$^{−1/2}$ converge in distribution to a standard normal distribution. By Kolmogorov's zero–one law, for any fixed M, the probability that the event $\limsup _{n}{\frac {S_{n}}{\sqrt {n}}}\geq M$ occurs is 0 or 1. Then
    $\Pr \left(\limsup _{n}{\frac {S_{n}}{\sqrt {n}}}\geq M\right)\geqslant \limsup _{n}\Pr \left({\frac {S_{n}}{\sqrt {n}}}\geq M\right)=\Pr \left({\mathcal {N}}(0,1)\geq M\right)>0$
so
    $\limsup _{n}{\frac {S_{n}}{\sqrt {n}}}=\infty \qquad {\text{with probability 1.}}$
An identical argument shows that
    $\liminf _{n}{\frac {S_{n}}{\sqrt {n}}}=-\infty \qquad {\text{with probability 1.}}$
This implies that these quantities cannot converge almost surely. In fact, they cannot even converge in probability, which follows from the equality
    ${\frac {S_{2n}}{\sqrt {2n}}}-{\frac {S_{n}}{\sqrt {n}}}={\frac {1}{\sqrt {2}}}{\frac {S_{2n}-S_{n}}{\sqrt {n}}}-\left(1-{\frac {1}{\sqrt {2}}}\right){\frac {S_{n}}{\sqrt {n}}}$
and the fact that the random variables
    ${\frac {S_{n}}{\sqrt {n}}}\quad {\text{and}}\quad {\frac {S_{2n}-S_{n}}{\sqrt {n}}}$
are independent and both converge in distribution to ${\mathcal {N}}(0,1).$
The law of the iterated logarithm provides the scaling factor where the two limits become different:
    ${\frac {S_{n}}{\sqrt {2n\log \log n}}}\ {\xrightarrow {p}}\ 0,\qquad {\frac {S_{n}}{\sqrt {2n\log \log n}}}\ {\stackrel {a.s.}{\nrightarrow }}\ 0,\qquad {\text{as}}\ \ n\to \infty .$
Thus, although the absolute value of the quantity $S_{n}/{\sqrt {2n\log \log n}}$ is less than any predefined ε > 0 with probability approaching one, it will nevertheless almost surely be greater than ε infinitely often; in fact, the quantity will be visiting the neighborhoods of any point in the interval (-1,1) almost surely.

## Generalizations and variants

The law of the iterated logarithm (LIL) for a sum of independent and identically distributed (i.i.d.) random variables with zero mean and bounded increment dates back to Khinchin and Kolmogorov in the 1920s.
Since then, there has been a tremendous amount of work on the LIL for various kinds of dependent structures and for stochastic processes. The following is a small sample of notable developments.
Hartman–Wintner (1940) generalized LIL to random walks with increments with zero mean and finite variance. De Acosta (1983) gave a simple proof of the Hartman–Wintner version of the LIL.
Chung (1948) proved another version of the law of the iterated logarithm for the absolute value of a brownian motion.
Strassen (1964) studied the LIL from the point of view of invariance principles.
Stout (1970) generalized the LIL to stationary ergodic martingales.
Wittmann (1985) generalized Hartman–Wintner version of LIL to random walks satisfying milder conditions.
Vovk (1987) derived a version of LIL valid for a single chaotic sequence (Kolmogorov random sequence). This is notable, as it is outside the realm of classical probability theory.
Yongge Wang (1996) showed that the law of the iterated logarithm holds for polynomial time pseudorandom sequences also. The Java-based software testing tool tests whether a pseudorandom generator outputs sequences that satisfy the LIL.
Balsubramani (2014) proved a non-asymptotic LIL that holds over finite-time martingale sample paths. This subsumes the martingale LIL as it provides matching finite-sample concentration and anti-concentration bounds, and enables sequential testing and other applications.