This question has been asked here before, but with a different doubt. I was reading this problem 4i from "A First Course in Probability" by Sheldon Ross.
Independent trials, resulting in a success with probability $p$ and a failure with probability $(1−p)$, are performed. What is the probability that $n$ successes occur before $m$ failures?
There are two approaches to solve the problem are given. I have problem with the approach using a recursion relation. It is as follows:
Denoting the probability of $n$ successes occurring before $m$ failures by $P_{n,m}$. It depends conditionally on the first result. If the first result is a success, the task is to obtain $n-1$ successes before $m$ failures. Whereas the first result being failure, the task would be to get $n$ successes before $m-1$ failures. So, the recursion relation is: $$P_{n,m}=pP_{n-1,m}+(1-p)P_{n,m-1}$$ Now, two boundary conditions are given to solve the relation, $P_{n,0}=0$ and $P_{0,m}=1$. I am not able to understand how these conditions are coming into picture. For the first one, I have some idea. For the required situation to take place, one has to have $n$ successes in $n+m-1$ trials, so the first condition means one has to get $n$ successes in $n-1$ trials, which is impossible. Is it correct? Can there be any other explanation?
Also, when I apply the same logic for the other condition, one has to get $0$ successes in $m-1$ trials, which seems to me like the probability of getting $m-1$ consecutive failures. Where am I going wrong? Please help me out.
It should be $P_{0,m}=1$ because you are guaranteed to have $0$ successes before $m$ failures. That is the flip side of $P_{n,0}=0$ where you are guaranteed not to get $n$ successes before $0$ failures.