Urn problem with put backs depending on drawn balls I have recently encountered following problem I was unable to solve:
Suppose we have a urn with two red balls and one black ball. If I draw the two red balls after eachother I win.
But if I draw the black ball I put all balls back in the urn and start over.
What is the probability to win after $n$ draws from the urn?
The first few $P(n)$ should look like this:
$P(1)=0$
$P(2)=1/3$
$P(3)=1/9$
$P(4)=1/9 + 1/27$
$P(5)=2/27 + 1/81$
 A: If draws occur without replacement unless the black ball is drawn, then we can create a simple Markov chain model with transition matrix $$\mathcal P = \begin{bmatrix}1/3 & 2/3 & 0 \\ 1/2 & 0 & 1/2 \\ 0 & 0 & 1 \end{bmatrix},$$ where the $(i+1)^{\rm th}$ row is the number of red balls drawn for $i = 0, 1, 2$.  Our beginning state vector is $$\boldsymbol e = \begin{bmatrix} 1 & 0 & 0 \end{bmatrix}.$$  Thus we can use this to obtain the probability distribution for the random number of draws $X$ needed to reach the absorbing state of $2$ red balls.  Because the original post did not show what effort was made to solve the question, I will not furnish a complete solution.
A: See edit below.
For one draw, the probability to win is: 2/3 · 1/2 = 1/3. The probability to loose is: 1 - 1/3 = 2/3.
Now to answer the rest of your question, I need to know do you want to win after exactly n draws or do you want to win at least once in n draws?
The probability to win at least once in n draws is 1 - the probability to loose n draws in succession, which is 1 - (2/3)^n.
The probability to win exactly on nth draw is (2/3)^(n-1)·1/3
Edit: now I better understand your question.
What you are looking for is a sequence of red and black balls, where the last two are red and from the first n-2 no two consecutive balls are red.
First let's look at the odd case, where we draw black balls all the time and then two red balls. We have drawn the black ball n-2 times in succession. Probability is (1/3)^(n-2)·(1/3).
Now let's consider the case where we have one occurrence of a red ball. We have drawn the black ball directly n-4 times (probability (1/3)^(n-4)) and one time we drew first a red ball and then black (probability (2/3)·(1/2)=1/3),but this red ball could be drawn in any of the n-3 draws (not n-2, then we would have won earlier), so we have to multiply by number of permutations, which is n-3 over 1. This is (1/3)^(n-4)·(1/3)·(n-3 1)·(1/3).
For the case with two red balls, you would have (1/3)^(n-6)·(1/3)^2·(n-3 2)·(1/3)
Now for the other extreme, you would have drawn a red ball and then a black ball in succession exactly (n-2)/2 times, given that n is even.
This probability is (1/3)^((n-2)/2)·(1/3)
To get the overall probability, you have to sum ask these probabilities.
Sum {m=0...(n-2)/2} [(1/3)^(n-2·m)·(1/3)^m·(n-2·m m)·(1/3)]
Here m is the number of red balls drawn.
For odd n you would have Sum{m=0...(n-3)/2} ...
