I found a card problem in an old book that essentially boiled down to this question: Suppose we have a random walk $S_n = X_1 + X_2 + \ldots + X_n$ that starts at $0$, where $X_i \hspace{0.1cm}$ is $1$ or $ -1$ with equal probability of $0.5$
We know that $S_{n} = 0$ and from that point on the walk no longer changes. (i.e it is only "walking" for n steps, and stops at $0$). The walk is n steps long
- Let $Z = \max(S_1,S_2,\ldots S_n)$. What is $E[Z]$? What is the distribution of Z?
Here is what I've managed so far: My first instinct was to use the reflection principle to count the number of walks that hit a height $k$ but do not surpass it. The only way I could manage this was in the following way: We know that there are $\binom{i}{\frac{i+k}{2}}$ paths between $(0,0)$ and a point $(i,k)$. Using the reflection principle, $\binom{i}{\frac{i+k+2}{2}}$ of these paths touch $k+1$ (meaning k would not be the maximum). So altogether there are $\binom{i}{\frac{i+k}{2}} - \binom{i}{\frac{i+k+2}{2}} = \frac{2k+2}{i+k+2} \cdot \binom{i}{\frac{i+k}{2}}$ paths from $(0,0)$ to $(i,k)$ that don't go higher than k.
Applying the same logic you can find that the number of paths from $(i,k)$ to $(n,0)$ that don't go higher than $k$ is $\frac{2k+2}{n-i+k+2} \cdot \binom{n-i}{\frac{n-i+k}{2}}$.
Now the way to go forward would be to multiply these two quantities to get the total number of paths for a given i, sum over all possible i, and divide by $\binom{n}{\frac{n}{2}}$ (total number of paths) to get $P(Z = k)$
But this seems to be extremely ugly and I can't figure out any way to work out this "sum over i's". I feel like there's got to be a simpler approach to this problem, and I can't figure out a way to simplify this sum. I also haven't found any MSE posts that answer this question for a "bridge"-like walk like in my case (I'm aware of the infinite case)
Any ideas?