# Symmetric random walk calculate

In basic, symmetric random walk with $$P(Y_{n}=1)=\frac{1}{2}$$, $$S_{0}=0$$, calculate: $$P(S_{1}>0,...,S_{2n-1}>0, S_{2n}=0)$$

• What if you take the first and last step and bring down the path. You get like some dick path. no? – Phicar Apr 8 at 19:14

You need to count the number of paths $$(S_0,S_1,\dots,S_{2n-1},S_{2n})$$ such that $$S_0=S_{2n}=0$$, $$S_i>0$$ for $$0, and consecutive $$S_i$$'s differ by $$\pm1$$. The path $$(S_1,S_2,\dots,S_{2n-1})$$ constitutes a Dyck path of length $$2(n-1)$$, and these are counted by the Catalan numbers.