What Positive Occupation Counts
For a random walk, the endpoint records where the path finishes, while its occupation time records how often it was on one side of zero along the way. The word “positive” matters: a visit to zero is not a visit to a strictly positive state. Counting zero visits separately makes it possible to compare strict positive occupation with time spent on the nonnegative half-line without mixing the two quantities.
Work on a probability space \((\Omega,\mathcal{F},\mathbb{P})\) carrying independent increments \((\xi_k)_{k\ge1}\), where \(\mathbb{P}(\xi_k=1)=\mathbb{P}(\xi_k=-1)=\tfrac12\). The simple symmetric random walk is \(S_0=0\) and \(S_k=\sum_{r=1}^k\xi_r\) for \(k\ge1\). It is a discrete-time process with state space \(\mathbb{Z}\). For \(n\ge0\), define the strict positive occupation time through step \(n\) by
Thus the count includes the positions \(S_1,\ldots,S_n\), but not \(S_0\). Since \(S_0=0\), including time zero would not change the strict positive count; it would change a nonnegative count. Define the zero and negative occupation counts on the same time range by \(Z_n=\sum_{k=1}^{n}\mathbf{1}_{\{S_k=0\}}\) and \(D_n=\sum_{k=1}^{n}\mathbf{1}_{\{S_k<0\}}\). Also write \(C_n=\sum_{k=1}^{n}\mathbf{1}_{\{S_k\ge0\}}\) for the number of nonnegative positions. Empty sums are zero, so all four counts are zero when \(n=0\).
At each time \(k\), exactly one of \(S_k>0\), \(S_k=0\), and \(S_k<0\) holds. The counts therefore satisfy a pathwise identity, meaning it holds for every possible path, not merely on average.
Proof. For each \(k\in\{1,\ldots,n\}\), the three indicators \(\mathbf{1}_{\{S_k>0\}}\), \(\mathbf{1}_{\{S_k=0\}}\), and \(\mathbf{1}_{\{S_k<0\}}\) sum to \(1\), because exactly one of their three events occurs. Summing this equality over the \(n\) time indices gives \(N_n+Z_n+D_n=n\). Also, for each \(k\), the event \(\{S_k\ge0\}\) is the disjoint union of \(\{S_k>0\}\) and \(\{S_k=0\}\). Summing their indicators gives \(C_n=N_n+Z_n\). When \(n=0\), each sum is empty and both identities hold with all counts zero. \(\square\)
Zero Visits and the Parity of the Walk
A simple walk changes parity at every step: after an odd number of steps its position is odd, and after an even number of steps its position is even. In particular, it can be at zero only at an even time. This restriction is useful when checking an occupation count: a zero recorded at an odd time signals either an arithmetic error or a different process from the simple walk defined above.
Proof. Each increment \(\xi_r\) is either \(1\) or \(-1\), and both are odd integers. A sum of \(k\) odd integers has the same parity as \(k\): reducing each summand modulo \(2\), each is congruent to \(1\), so \(S_k=\sum_{r=1}^k\xi_r\) is congruent to \(k\) modulo \(2\). Zero is even, so \(S_k\) cannot equal zero when \(k\) is odd. By the definition of \(Z_n\), its only possible contributions are therefore from even indices no greater than \(n\). \(\square\)
Worked Example: A Path with Two Zero Visits
Take the six increments \(+1,+1,-1,-1,+1,-1\). Their successive partial sums, starting from \(S_0=0\), are \(S_1=1\), \(S_2=2\), \(S_3=1\), \(S_4=0\), \(S_5=1\), and \(S_6=0\). The path has probability \((\tfrac12)^6=\tfrac1{64}\), since each of its six specified increments has probability \(\tfrac12\) and the increments are independent.
The positions at times \(1,\ldots,6\) are positive at times \(1,2,3,5\), zero at times \(4,6\), and negative at no time. Hence \(N_6=4\), \(Z_6=2\), and \(D_6=0\). The nonnegative count is \(C_6=6\): every one of the six positions is at least zero. Including time zero would give seven nonnegative positions, because \(S_0=0\) is an additional position, but would still give four strictly positive positions.
Check: \(N_6+Z_6+D_6=4+2+0=6\), and \(N_6+Z_6=4+2=6=C_6\). The zero visits occur at times \(4\) and \(6\), both even as required.
Worked Example: A Path That Crosses Below Zero
Take the eight increments \(-1,+1,+1,-1,+1,-1,-1,+1\). Starting at zero, the successive positions are \(S_1=-1\), \(S_2=0\), \(S_3=1\), \(S_4=0\), \(S_5=1\), \(S_6=0\), \(S_7=-1\), and \(S_8=0\). The specified path has probability \((\tfrac12)^8=\tfrac1{256}\).
The strictly positive positions occur at times \(3\) and \(5\), so \(N_8=2\). The zero positions occur at times \(2,4,6,8\), so \(Z_8=4\). The negative positions occur at times \(1\) and \(7\), so \(D_8=2\). The nonnegative count includes the two positive and four zero positions: \(C_8=2+4=6\).
Check: \(N_8+Z_8+D_8=2+4+2=8\), the number of counted times. Every zero time listed is even; the odd-time positions are \(-1,1,1,-1\), all odd as the parity property requires.
Expected Strict Positive Occupation
For a symmetric walk, reversing the sign of every increment changes every position \(S_k\) to \(-S_k\) and preserves the probability of each path. Thus positive and negative occupation have the same expectation. Zero visits are the times not assigned to either strict side, so the expected positive count can be expressed using the expected number of zero visits.
Proof. Let \(D_n\) be the negative occupation count defined above. For any fixed sequence of \(n\) increments, the sequence obtained by changing each increment’s sign has the same probability \(2^{-n}\). This transformation sends each position \(S_k\) to \(-S_k\), so it sends the event that \(S_k>0\) to the event that the transformed position is negative. It follows, by pairing paths under this probability-preserving transformation, that \(\mathbb{E}[N_n]=\mathbb{E}[D_n]\). The pathwise identity \(N_n+Z_n+D_n=n\) then gives \(2\mathbb{E}[N_n]+\mathbb{E}[Z_n]=n\), and hence \(\mathbb{E}[N_n]=\tfrac12(n-\mathbb{E}[Z_n])\).
To compute \(\mathbb{E}[Z_n]\), use the definition of \(Z_n\) and linearity of expectation: \(\mathbb{E}[Z_n]=\sum_{k=1}^n\mathbb{P}(S_k=0)\). The parity result makes every odd-time term zero. At time \(2m\), the walk is at zero exactly when it has taken \(m\) upward steps and \(m\) downward steps. There are \(\binom{2m}{m}\) ways to choose which \(m\) of the \(2m\) steps are upward, and each specified sequence has probability \(2^{-2m}\). Thus \(\mathbb{P}(S_{2m}=0)=\binom{2m}{m}/2^{2m}\). Summing over \(1\le m\le\lfloor n/2\rfloor\) gives the displayed formula. If \(n=0\) or \(n=1\), the sum is empty, so \(\mathbb{E}[Z_n]=0\) and the formula gives \(\mathbb{E}[N_n]=n/2\), namely \(0\) and \(1/2\), respectively; at \(n=1\), this agrees with the direct count, since \(S_1\) is positive with probability \(1/2\). \(\square\)
Worked Example: Enumerating the Occupation Counts at Four Steps
There are \(2^4=16\) equally likely increment sequences of length four, each with probability \((\tfrac12)^4=\tfrac1{16}\). The table gives the positions at times \(1,2,3,4\) for each sequence and counts only positions strictly greater than zero.
| Increments | \((S_1,S_2,S_3,S_4)\) | \(N_4\) |
|---|---|---|
| ++++ | \((1,2,3,4)\) | 4 |
| +++- | \((1,2,3,2)\) | 4 |
| ++-+ | \((1,2,1,2)\) | 4 |
| ++-- | \((1,2,1,0)\) | 3 |
| +-++ | \((1,0,1,2)\) | 3 |
| +-+- | \((1,0,1,0)\) | 2 |
| +--+ | \((1,0,-1,0)\) | 1 |
| +--- | \((1,0,-1,-2)\) | 1 |
| -+++ | \((-1,0,1,2)\) | 2 |
| -++- | \((-1,0,1,0)\) | 1 |
| -+-+ | \((-1,0,-1,0)\) | 0 |
| -+-- | \((-1,0,-1,-2)\) | 0 |
| --++ | \((-1,-2,-1,0)\) | 0 |
| --+- | \((-1,-2,-1,-2)\) | 0 |
| ---+ | \((-1,-2,-3,-2)\) | 0 |
| ---- | \((-1,-2,-3,-4)\) | 0 |
There are six paths with \(N_4=0\), three with \(N_4=1\), two with \(N_4=2\), two with \(N_4=3\), and three with \(N_4=4\). These counts add to \(6+3+2+2+3=16\). Weighting each value by its number of paths gives
Check using the theorem: The possible zero visits by time \(4\) are at times \(2\) and \(4\). Their probabilities are \(\mathbb{P}(S_2=0)=\binom{2}{1}/2^2=2/4=\tfrac12\) and \(\mathbb{P}(S_4=0)=\binom{4}{2}/2^4=6/16=\tfrac38\). Therefore \(\mathbb{E}[Z_4]=\tfrac12+\tfrac38=\tfrac78\), and the theorem gives \(\mathbb{E}[N_4]=\tfrac12(4-\tfrac78)=\tfrac12\cdot\tfrac{25}{8}=\tfrac{25}{16}\), matching the enumeration.
A Common Counting Pitfall
A common mistake is to use “positive” as if it meant “nonnegative.” For the eight-step path in the second example, counting all positions \(S_k\ge0\) gives \(6\), but that number is \(C_8\), not \(N_8\). The four zero positions are included in \(C_8\) and excluded from \(N_8\), so the correction is \(N_8=C_8-Z_8=6-4=2\). A second bookkeeping error is to count time zero inconsistently: the definitions here use times \(1\) through \(n\), and adding \(S_0\) adds one to the nonnegative count because \(S_0=0\), but adds nothing to the strict positive count.
For any particular path, the safest check is to classify each of \(S_1,\ldots,S_n\) as positive, zero, or negative, and then verify that the three counts add to \(n\). For an expectation calculation, use the same distinction: positive and negative occupation have equal expectations by symmetry, while zero occupation must be subtracted before dividing the remaining time equally between the two strict sides.
Check Your Understanding
In each question, count only times \(1,\ldots,n\) unless it explicitly says to include time zero.
- For the positions \((S_1,S_2,S_3,S_4)=(1,0,-1,0)\), find \(N_4\), \(Z_4\), \(D_4\), and \(C_4\).
- Can a simple symmetric walk started at zero be at zero at time \(5\)? Explain using parity.
- For a path with \(N_6=2\), \(Z_6=3\), and \(D_6=1\), verify the pathwise count identity and find \(C_6\).
- Use the expectation formula to compute \(\mathbb{E}[N_2]\), showing the return probability used.
- Explain why counting positions \(S_k\ge0\) does not in general give the strict positive occupation time.