Skip to content

The arcsine law

Posted on:

Two players, A and B, toss a fair coin 2n2n times. Each head is a point for A and each tail a point for B, so A’s lead after kk tosses, A’s points minus B’s, is

Sk=X1++Xk,Xi=±1 with probability 12 each,S_k = X_1 + \cdots + X_k, \qquad X_i = \pm 1 \text{ with probability } \tfrac12 \text{ each,}

a simple random walk started at 00.

For what fraction of the game is A ahead?

The players are interchangeable, so the answer is symmetric about one half, and the natural guess is that it also concentrates there: in a fair game the lead should change hands regularly, and each player should be ahead about half the time. The exact distribution does not concentrate there. The fraction of the game spent in the lead is most likely to be near 00 or near 11, and one half is its least likely value. In the limit of a long game:

The limiting density of the fraction is 1/(πx(1x))1/(\pi\sqrt{x(1-x)}), a U shape with integrable singularities at both ends, and the corresponding distribution function is 2πarcsinx\frac{2}{\pi}\arcsin\sqrt{x}: this is the arcsine law. The derivation needs one identity about paths, a product formula that follows from it, and Stirling’s approximation.

Ties are rare

The score is tied at time 2m2m with probability

u2m=P(S2m=0)=(2mm)22m    1πm,u_{2m} = \mathbb{P}(S_{2m} = 0) = \binom{2m}{m} 2^{-2m} \;\sim\; \frac{1}{\sqrt{\pi m}},

the asymptotic form coming from Stirling’s formula; ties at odd times are impossible. The decay is slow: after a million tosses the chance of an exact tie at that moment is still 0.08%0.08\%. Summing over the even times gives the expected number of ties in 2n2n tosses,

m=1nu2m=(2n+1)u2n1    2nπ,\sum_{m=1}^{n} u_{2m} = (2n+1)\,u_{2n} - 1 \;\approx\; 2\sqrt{\frac{n}{\pi}},

where the closed form follows by induction from u2m=u2m+22m+22m+1u_{2m} = u_{2m+2}\cdot\frac{2m+2}{2m+1}. A game of 10,000 tosses has about 79 ties on average. The lead can change hands only at a tie, so it changes at most a few dozen times in ten thousand tosses. The U shape also needs the stretches between ties to be heavy-tailed, which the next section quantifies.

Reflection principle

Lemma. The probability that the score is never tied during 2n2n tosses equals the probability that it is tied at the end:

P(S10,,S2n0)  =  P(S2n=0)  =  u2n.\mathbb{P}(S_1 \neq 0,\, \ldots,\, S_{2n} \neq 0) \;=\; \mathbb{P}(S_{2n} = 0) \;=\; u_{2n}.

The two signs are symmetric, so it suffices to show P(S1>0,,S2n>0)=12u2n\mathbb{P}(S_1 > 0, \ldots, S_{2n} > 0) = \tfrac12 u_{2n}, which is a count of paths. Write Nm,y=(m(m+y)/2)N_{m,y} = \binom{m}{(m+y)/2} for the number of paths of mm steps from 00 to yy. A path that stays positive begins with an up-step to (1,1)(1, 1) and then runs from (1,1)(1,1) to (2n,y)(2n, y) for some even y>0y > 0 without touching the axis. Among all N2n1,y1N_{2n-1,\,y-1} paths from (1,1)(1,1) to (2n,y)(2n,y), the ones that do touch the axis are in bijection with the paths from (1,1)(1,-1) to (2n,y)(2n,y): reflect the initial segment, up to the first visit to 00, in the axis.

(1, 1) (1, −1) (2n, y) first tie 0 time S path that touches the axis its reflection up to the first tie

So the number of paths from (1,1)(1,1) to (2n,y)(2n,y) that avoid the axis is N2n1,y1N2n1,y+1N_{2n-1,\,y-1} - N_{2n-1,\,y+1}. Summing over y=2,4,,2ny = 2, 4, \ldots, 2n telescopes to N2n1,1=(2n1n)=12(2nn)N_{2n-1,\,1} = \binom{2n-1}{n} = \tfrac12\binom{2n}{n}, and dividing by the 22n2^{2n} equally likely paths gives 12u2n\tfrac12 u_{2n}.

The same count gives a second form that is needed below: P(S10,,S2n0)=u2n\mathbb{P}(S_1 \ge 0, \ldots, S_{2n} \ge 0) = u_{2n}. Deleting the first step of a strictly positive path of 2n2n steps and shifting it down by one gives a non-negative path of 2n12n-1 steps, and this is a bijection, so P(S10,,S2n10)=212u2n\mathbb{P}(S_1 \ge 0, \ldots, S_{2n-1} \ge 0) = 2 \cdot \tfrac12 u_{2n}; and since S2n1S_{2n-1} is odd, S2n10S_{2n-1} \ge 0 forces S2n11S_{2n-1} \ge 1, hence S2n0S_{2n} \ge 0 automatically.

The lemma also describes the stretches between ties. The probability that the first tie occurs at time 2r2r is f2r=u2r2u2r=u2r/(2r1)r3/2/(2π)f_{2r} = u_{2r-2} - u_{2r} = u_{2r}/(2r-1) \sim r^{-3/2}/(2\sqrt{\pi}), and the probability that a stretch lasts longer than 2m2m tosses is u2mu_{2m} itself, of order m1/2m^{-1/2}. A tail this heavy has infinite mean, and in a game of 2n2n tosses the longest stretch occupies a positive fraction of the whole game. Whoever is ahead during that stretch is ahead for a large part of the game.

The last tie

Let LL be the time of the last tie, with L=0L = 0 if the score is never tied. For L=2kL = 2k the walk must be at zero at time 2k2k and then avoid zero for the remaining 2n2k2n - 2k steps; the steps after time 2k2k form a fresh walk, so by the lemma

P(L=2k)=u2ku2n2k,k=0,1,,n.\mathbb{P}(L = 2k) = u_{2k}\, u_{2n-2k}, \qquad k = 0, 1, \ldots, n.

This is the discrete arcsine law. Two features follow directly. The formula is symmetric under knkk \leftrightarrow n - k: the last tie is as likely to fall at time 2k2k as at time 2n2k2n - 2k, so a last tie inside the first tenth of the game and a last tie inside the final tenth are equally probable. And since u2mu_{2m} decreases in mm, the two ends k=0k = 0 and k=nk = n are the most probable values, each with probability u2nu_{2n}, while the middle is the least probable: for even nn, P(L=n)=un22/(πn)\mathbb{P}(L = n) = u_n^2 \approx 2/(\pi n), below the endpoint value by a factor of πn/2\sqrt{\pi n}/2. The 20-toss game, to four decimals, with only the first half listed since the second half mirrors it:

last tie at toss02610
probability.1762.0927.0655.0606

Inserting u2m1/πmu_{2m} \approx 1/\sqrt{\pi m} and writing x=k/nx = k/n,

P(L=2k)    1πk(nk)  =  1n1πx(1x),\mathbb{P}(L = 2k) \;\approx\; \frac{1}{\pi\sqrt{k(n-k)}} \;=\; \frac{1}{n}\cdot\frac{1}{\pi\sqrt{x(1-x)}},

so the fraction L/2nL/2n of the game elapsed before the last tie has, in the limit, the density 1/(πx(1x))1/(\pi\sqrt{x(1-x)}). The substitution x=sin2θx = \sin^2\theta integrates it:

P ⁣(L2nx)    0xdtπt(1t)  =  2πarcsinx.\mathbb{P}\!\left(\frac{L}{2n} \le x\right) \;\longrightarrow\; \int_0^x \frac{dt}{\pi\sqrt{t(1-t)}} \;=\; \frac{2}{\pi}\arcsin\sqrt{x}.

The limiting density is the beta distribution with both parameters equal to 12\tfrac12.

Time in the lead has the same distribution

Call the interval between tosses k1k-1 and kk an interval where A is ahead if Sk1>0S_{k-1} > 0 or Sk>0S_k > 0. A tie is credited to the player who was ahead just before or just after it, so all the intervals between two consecutive ties go to one player, and A’s count is always even. Theorem. The number of intervals where A is ahead equals 2k2k with probability u2ku2n2ku_{2k}\,u_{2n-2k}, for k=0,,nk = 0, \ldots, n: exactly the distribution of the last tie.

The derivation conditions on the first tie. Write p2k,2np_{2k,2n} for the probability in question. The two boundary cases are the lemma in its second form: p2n,2n=P(S10,,S2n0)=u2np_{2n,2n} = \mathbb{P}(S_1 \ge 0, \ldots, S_{2n} \ge 0) = u_{2n}, and p0,2n=u2np_{0,2n} = u_{2n} by symmetry. For 1kn11 \le k \le n-1 the score must be tied at some time 2r2n2r \le 2n. If the first tie comes at 2r2r and the stretch before it was A’s (probability 12f2r\tfrac12 f_{2r}), that stretch contributes 2r2r intervals to A and the remaining 2n2r2n - 2r tosses must contribute 2k2r2k - 2r; if the stretch was B’s, the remaining tosses must contribute all 2k2k:

p2k,2n=12r=1kf2rp2k2r,2n2r+12r=1nkf2rp2k,2n2r.p_{2k,2n} = \frac12\sum_{r=1}^{k} f_{2r}\, p_{2k-2r,\,2n-2r} + \frac12\sum_{r=1}^{n-k} f_{2r}\, p_{2k,\,2n-2r}.

Induction on nn turns the probabilities on the right into u2k2ru2n2ku_{2k-2r}\,u_{2n-2k} and u2ku2n2k2ru_{2k}\,u_{2n-2k-2r}, and the renewal identity u2m=r=1mf2ru2m2ru_{2m} = \sum_{r=1}^{m} f_{2r}\,u_{2m-2r} (a tie at time 2m2m has a first tie at some time 2r2m2r \le 2m) collapses both sums, leaving 12u2ku2n2k+12u2ku2n2k\tfrac12 u_{2k}u_{2n-2k} + \tfrac12 u_{2k}u_{2n-2k}.

Restrict attention to the games that end tied. Chung and Feller proved in 1949 that among the (2nn)\binom{2n}{n} paths with S2n=0S_{2n} = 0, exactly 1n+1(2nn)\frac{1}{n+1}\binom{2n}{n} of them, a Catalan number, have A ahead for 2k2k intervals, and this holds for every kk from 00 to nn. Conditioned on a tie at the end, the time in the lead is uniformly distributed. The U shape therefore comes from the games that end with someone ahead, and within those games the distribution of the time in the lead is more concentrated at the two ends than the unconditional one.

The widget draws a random game on the left, with A’s intervals in blue and B’s in red. On the right is the exact distribution u2ku2n2ku_{2k}u_{2n-2k} of A’s number of intervals, computed from the recursion u2m=u2m22m12mu_{2m} = u_{2m-2}\cdot\frac{2m-1}{2m} rather than sampled, with the arcsine density overlaid. Ticking the box conditions both panels on a tie at the end and replaces the U with the flat Chung–Feller law.

tosses 2n = 100
exact distribution arcsine density
A ahead for of this game
P(one player ahead for ≥ 90% of the game) = limit 0.410expected ties =

Quantiles of the limit

The event that the player who spends longer in the lead does so for at least a fraction q>12q > \tfrac12 of the game has limiting probability 4πarcsin1q\frac{4}{\pi}\arcsin\sqrt{1-q}:

qq70%80%90%99%
probability.738.590.410.128

Setting the probability to 12\tfrac12 and to 15\tfrac15 and solving for qq gives 85.4%85.4\% and 97.6%97.6\%, the two figures quoted at the start. A trading strategy that stays above its benchmark for 90% of a year, or a team that leads for 90% of a match, is showing an event that a fair coin produces one time in five (2πarcsin0.1=0.205\frac{2}{\pi}\arcsin\sqrt{0.1} = 0.205 for a specified side). Time spent in the lead is weak evidence of an edge, and the margin at the end is the quantity that carries the information.

The law is not specific to coin tossing. Lévy (1939) proved the arcsine law for Brownian motion, where it holds exactly at every time horizon; for Brownian motion the same law describes the fraction of time spent positive, the last zero, and the location of the maximum. Erdős and Kac (1947) showed that the fraction of positive partial sums has the same arcsine limit for independent steps with mean zero and finite variance whenever the central limit theorem applies to them, in particular for all i.i.d. steps with finite variance, an early instance of the invariance principle (a limit law that depends on the step distribution only through its mean and variance, because the rescaled walk converges to Brownian motion). Sparre Andersen (1953, 1954) found the exact finite-nn version: for i.i.d. steps with any symmetric continuous distribution, the number of positive partial sums among S1,,SnS_1, \ldots, S_n equals kk with probability u2ku2n2ku_{2k}\,u_{2n-2k} for every nn, the same numbers as in the coin-tossing case, and the argument is purely combinatorial. The U shape is a property of sums of independent symmetric steps, not of ±1\pm 1 steps in particular.

References



Next Post
Johnson–Lindenstrauss lemma