Question:
$$P(X_1\gt 0, ..., X_n\gt 0, X_n=a-b)=?$$
Its Answer:
$= (1,1) \rightarrow (n,a-b) $ that meet neither touch nor cross paths.
$=[(1,1) \rightarrow (n,a-b) \ \ \text{all paths}]-[(1,1) \rightarrow (n,a-b) \ \text{that meet touch or cross paths.}]$
$$=[(1,1) \rightarrow (n,a-b) \ \ \text{all paths}]-[(1,-1) \rightarrow (n,a-b) \ \ \text{all paths}]$$
$$=\binom{n-1}{n-1+a-b-1\over 2}-\binom{n-1}{n-1+a-b+1\over 2}$$
$$=\binom{a+b-1}{a-1}-\binom{a+b-1}{a}$$
where $n=a+b$
I have used reflection principe that $= (1,1) \rightarrow (n,a-b) $ that meet touch or cross paths. equal to $(1,-1) \rightarrow (n,a-b) \ \ \text{all paths}$
My real question:
But if I have $$P(X_1\ge 0, ..., X_n\ge 0, X_n=a-b)=?$$ how can I solve this question like my above solution. How can I use reflection principle? Please explain it. Thank you so much:)
Take any path $P$ from $(0,0)$ to $(n,a-b)$. By adding a $+1$ step from $(-1,-1)$ to $(0,0)$ we now have a path $P^{'}$ of length $n+1$ from $(-1,-1)$ to $(n,a-b)$. We now shift path $P^{'}$ one unit up and one unit right, giving us a path $P^{''}$ from $(0,0)$ to $(n+1,a-b+1)$.
Now, for $i\geq 1,\;$ $P$ has all its $X_i\geq 0\;$ iff $\;P^{''}$ has all its $X_i\gt 0$.
So we can use your previous result, replacing $a$ with $a+1$, to count the number of paths $P^{''}$:
\begin{eqnarray*} && \#\{\text{paths $P$ with $X_1\geq 0,\ldots,X_{n}\geq 0, X_{n}=a-b$}\} \\ && \quad = \#\{\text{paths $P^{''}$ with $X_1\gt 0,\ldots,X_{n+1}\gt 0, X_{n+1}=a-b+1$}\} \\ && \quad = \binom{a+b}{a} - \binom{a+b}{a+1}. \end{eqnarray*}