Occupation Time and the Role of Zero
Let \((\Omega,\mathcal F,\mathbb P)\) carry independent increments \(\xi_1,\xi_2,\ldots\), each equal to \(1\) or \(-1\) with probability \(\tfrac12\), and define the simple symmetric random walk \(S_0=0\), \(S_n=\sum_{j=1}^n \xi_j\) on the state space \(\mathbb Z\), in discrete time \(n\ge0\). We count only times \(k=1,\ldots,n\) at which the walk is strictly above zero: \(N_n=\sum_{k=1}^n\mathbf 1_{\{S_k>0\}}\). A visit to zero contributes nothing; in particular, a return to zero separates excursions but is not itself positive occupation.
We seek the limiting distribution of \(N_n/n\). Its limit is not concentrated at its mean: long positive and negative excursions make the fraction fluctuate substantially. The generating-function calculation below keeps track of those excursions, including ties at zero. Write \(F(t,z)=\sum_{n\ge0}\mathbb E[z^{N_n}]t^n\), initially as a formal power series in \(t\).
For this walk, symmetry gives \(\mathbb P(S_k>0)=(1-u_k)/2\) and \(\mathbb P(S_k\le0)=(1+u_k)/2\), where \(u_k=\mathbb P(S_k=0)\). The latter equality is exactly where returns to zero enter: for even \(k\), the zero probability belongs to the nonpositive part. Since \(u_{2m}=\binom{2m}{m}/4^m\) and \(u_{2m+1}=0\), define $$ U(t)=\sum_{k\ge1}\frac{u_k t^k}{k} =\log\left(\frac{2}{1+\sqrt{1-t^2}}\right),\qquad C(t)=e^{U(t)}=\frac{2}{1+\sqrt{1-t^2}}. $$
To verify the series identity for \(U\), differentiate its defining series: \(tU'(t)=\sum_{k\ge1}u_k t^k=(1-t^2)^{-1/2}-1\). Differentiating the displayed logarithm gives the same expression for \(tU'(t)\), and both sides vanish at \(t=0\). Substituting the positive and nonpositive probabilities into Spitzer's identity and separating the terms involving \(t\) and \(zt\) yields $$ F(t,z)=\frac{1}{\sqrt{(1-t)(1-zt)}}\sqrt{\frac{C(t)}{C(zt)}}. $$
This formula is valid near \(t=0,z=1\), where the square roots are chosen to equal \(1\) at zero. It gives \(F(t,1)=1/(1-t)\), as required because \(1^{N_n}=1\) for every path. That check is also a useful safeguard against losing the mass of returns to zero.
Derivatives and the Two Singular Points
Set \(H(x)=-\tfrac12\log(1-x)-\tfrac12\log C(x)\) and \(\theta=x\,d/dx\). The explicit formula can be written \(\log F(t,z)=-\tfrac12\log(1-t)+H(zt)\). Thus, for each integer \(r\ge1\), the \(r\)th derivative in \(z\) of \(\log F(t,z)\), evaluated at \(z=1\), is \(D_r(t)=\theta^rH(t)\). In particular, differentiating the explicit formula once gives $$ D_1(t)=\frac12\left(\frac{1}{1-t}-\frac{1}{\sqrt{1-t^2}}\right). $$
Let \(F_r(t)=\left.\partial_z^rF(t,z)\right|_{z=1}\). Since \(F(t,1)=1/(1-t)\), differentiating the exponential gives $$ F_r(t)=\frac{1}{1-t}\,B_r(D_1(t),\ldots,D_r(t)), $$ where \(B_r\) is the complete exponential Bell polynomial, defined by \(\exp(\sum_{j\ge1}x_jv^j/j!)=\sum_{r\ge0}B_r(x_1,\ldots,x_r)v^r/r!\). Also, \([t^n]F_r(t)=\mathbb E[(N_n)_r]\), where \((m)_r=m(m-1)\cdots(m-r+1)\) is the falling factorial.
We need the local behavior at both \(t=1\) and \(t=-1\). As \(t\) approaches \(1\) from within the analytic domain, \(\sqrt{1-t^2}=O(\sqrt{1-t})\), so \(H(t)=-\tfrac12\log(1-t)-\tfrac12\log2+O(\sqrt{1-t})\). Applying \(\theta^r\) directly to this expansion gives $$ D_r(t)=\frac{(r-1)!}{2}(1-t)^{-r} +O\big((1-t)^{1/2-r}\big),\qquad t\longrightarrow1. $$
The other endpoint cannot simply be ignored. As \(t\) approaches \(-1\), \(H(t)\) is a constant plus a term of order \(\sqrt{1+t}\), with analytic terms also allowed. Direct differentiation therefore gives \(D_j(t)=O((1+t)^{1/2-j})\) for each \(j\ge1\). In a product in \(B_r\), a term with \(\ell\) factors has order at worst \((1+t)^{\ell/2-r}\); since \(\ell\ge1\), the worst order is \((1+t)^{1/2-r}\). The factor \(1/(1-t)\) in \(F_r\) is regular at \(-1\). Consequently the contribution from this endpoint to the coefficient of \(t^n\) is \(O(n^{r-3/2})\), whereas the leading contribution from \(t=1\) is of order \(n^r\).
Here we use the standard singularity-transfer theorem for power series: a term \(A(1-t)^{-\alpha}\), with \(\alpha>0\), contributes \(A n^{\alpha-1}/\Gamma(\alpha)\) to leading order; an algebraic singularity of order \((1+t)^{-\beta}\) contributes an alternating term of order \(n^{\beta-1}\). The theorem applies to these functions, which are analytic in a neighborhood of the closed unit disk apart from the indicated algebraic or logarithmic singularities at \(1\) and \(-1\). The transfer theorem is standard and its proof is beyond this derivation.
Proof. Fix \(r\ge1\). At \(t=1\), the leading term of \(D_j(t)\) is \(c_j(1-t)^{-j}\), where \(c_j=(j-1)!/2\). Every product contributing to \(B_r\) has total singular order \(r\), so $$ F_r(t)\sim B_r(c_1,\ldots,c_r)(1-t)^{-r-1}. $$ The transfer theorem gives \(\mathbb E[(N_n)_r]\sim B_r(c_1,\ldots,c_r)n^r/r!\); the contribution from \(t=-1\) is lower order by the preceding bound. To evaluate the constant, the defining series for the Bell polynomials gives $$ \sum_{r\ge0}\frac{B_r(c_1,\ldots,c_r)}{r!}v^r =\exp\left(\frac12\sum_{j\ge1}\frac{v^j}{j}\right) =(1-v)^{-1/2}. $$ Thus \(B_r(c_1,\ldots,c_r)/r!=\binom{2r}{r}/4^r\). Since \(0\le N_n\le n\), replacing falling factorials by ordinary powers changes the \(r\)th normalized moment only by terms bounded by a constant times \(1/n\); induction over the lower powers then gives \(\lim_{n\to\infty}\mathbb E[(N_n/n)^r]=\binom{2r}{r}/4^r\).
For the displayed density, the \(r\)th moment is \(\pi^{-1}\int_0^1 x^{r-1/2}(1-x)^{-1/2}\,dx\). Substituting \(x=\sin^2\theta\) makes it \((2/\pi)\int_0^{\pi/2}\sin^{2r}\theta\,d\theta=\binom{2r}{r}/4^r\); the last equality follows by integration by parts, giving the recurrence \(I_r=(2r-1)I_{r-1}/(2r)\) with \(I_0=\pi/2\). Finally, all variables \(N_n/n\) lie in the compact interval \([0,1]\). Any subsequential distributional limit therefore has these moments; polynomials determine a probability measure on \([0,1]\), by uniform polynomial approximation of continuous functions. The moments identify the unique limit as the displayed density. \(\square\)
Worked Example: The First Two Steps
For \(n=2\), calculate the full distribution of \(N_2\), including the zero visits. The four equally likely paths are \(++,+-,-+,--\). Their positive occupation counts are respectively \(2,1,0,0\): on \(+-\), the second position is zero, so only the first time counts. Hence \(\mathbb P(N_2=0)=\tfrac12\), \(\mathbb P(N_2=1)=\tfrac14\), and \(\mathbb P(N_2=2)=\tfrac14\), giving \(\mathbb E[z^{N_2}]=\tfrac12+\tfrac14z+\tfrac14z^2\).
Check by the generating function. In the exponent of Spitzer's identity, the \(t\) term is \(\tfrac12(1+z)t\). For \(k=2\), \(\mathbb P(S_2\le0)=\tfrac34\) and \(\mathbb P(S_2>0)=\tfrac14\), so the \(t^2\) term is \((\tfrac38+\tfrac18z^2)t^2\). Exponentiating, the coefficient of \(t^2\) is \(\tfrac38+\tfrac18z^2+\tfrac12(\tfrac12+\tfrac12z)^2 =\tfrac12+\tfrac14z+\tfrac14z^2\), agreeing with the path count.
Worked Example: The Mean at Four Steps
Differentiate once. Since \(\mathbb E[N_n]=[t^n]F_1(t)\), the explicit derivative gives $$ F_1(t)=\frac{D_1(t)}{1-t} =\frac12\left(\frac{1}{(1-t)^2} -\frac{1}{(1-t)\sqrt{1-t^2}}\right). $$
For \(n=4\), the coefficient of \(t^4\) in \((1-t)^{-2}\) is \(5\). In the second product, the coefficients through \(t^4\) of \((1-t^2)^{-1/2}\) are \(1,0,\tfrac12,0,\tfrac38\); after multiplication by \((1-t)^{-1}\), the \(t^4\) coefficient is \(1+\tfrac12+\tfrac38=\tfrac{15}{8}\). Therefore \(\mathbb E[N_4]=\tfrac12(5-\tfrac{15}{8})=\tfrac{25}{16}\). Directly, the probabilities of being positive at times \(1,2,3,4\) are \(\tfrac12,\tfrac14,\tfrac12,\tfrac5{16}\), whose sum is \(\tfrac{25}{16}\). This independently checks the derivative calculation.
Worked Example: The Second and Third Limiting Moments
The leading terms at \(t=1\) are \(D_1\sim\tfrac12(1-t)^{-1}\), \(D_2\sim\tfrac12(1-t)^{-2}\), and \(D_3\sim(1-t)^{-3}\). From the Bell polynomials, \(F_2=(1-t)^{-1}(D_1^2+D_2)\), whose leading coefficient is \((\tfrac14+\tfrac12)(1-t)^{-3}=\tfrac34(1-t)^{-3}\). Since \([t^n](1-t)^{-3}=(n+1)(n+2)/2\), this gives \(\mathbb E[(N_n)_2]\sim\tfrac38n^2\), and hence the limiting second moment is \(\tfrac38\).
For \(r=3\), \(F_3=(1-t)^{-1}(D_1^3+3D_1D_2+D_3)\). Its leading coefficient is \((\tfrac18+\tfrac34+1)(1-t)^{-4}=\tfrac{15}{8}(1-t)^{-4}\). Because \([t^n](1-t)^{-4}=(n+1)(n+2)(n+3)/6\), the limiting third moment is \(\tfrac{15}{8}\cdot\tfrac16=\tfrac5{16}\). These agree with the density's moments \(\binom{4}{2}/4^2=\tfrac38\) and \(\binom{6}{3}/4^3=\tfrac5{16}\), respectively.
Why the Zero Case Matters
Common pitfall: treating a return to zero as a negative endpoint. In the \(k=2\) term above, replacing \(\mathbb P(S_k\le0)\) by \(\mathbb P(S_k<0)\) changes \(\tfrac34\) to \(\tfrac14\), because \(S_2=0\) with probability \(\tfrac12\). This incorrect replacement makes the exponent's \(t^2\) term \((\tfrac18+\tfrac18z^2)t^2\). The resulting coefficient of \(t^2\) in \(F\) is \(\tfrac14+\tfrac14z+\tfrac14z^2\), whose value at \(z=1\) is \(\tfrac34\), not \(1\). The missing probability is exactly the return-to-zero contribution. Always check \(F(t,1)=1/(1-t)\) before extracting occupation probabilities or moments.
The arcsine density places substantial mass near both endpoints, reflecting paths whose positive or negative excursions dominate a long interval. That conclusion concerns the occupation fraction itself; the singularity at \(t=-1\), caused by the walk's even-time returns, is a separate analytic contribution and must be shown to be lower order rather than discarded without checking.
Check Your Understanding
Use the strict-positive convention \(S_k>0\); a time at zero is not counted.
- For the path \(+,-,+,-\), compute \(N_4\) and \(N_4/4\).
- Why does \(\mathbb P(S_2=0)\) belong in \(\mathbb P(S_2\le0)\) in the generating-function identity?
- Using \(D_1(t)\), compute the coefficient of \(t^2\) in \(F_1(t)\), and compare it with a direct calculation of \(\mathbb E[N_2]\).
- What is the order of the contribution to \([t^n]F_r(t)\) from the singularity at \(t=-1\), and why is it lower order than the \(t=1\) contribution?
- Evaluate the arcsine limiting second moment and compare it with the value obtained from the \(r=2\) Bell-polynomial calculation.