I am having trouble with a probability question regarding to G-distribution.
Background: Let's assume I have a disc that has two sides, one is black and one is white. Note: the disc has biased probability: the probability to get black is $p$ and the probability to get white is $1-p$. when u toss the disc time after time, the number of tosses ($Z$) until u get black at the first time distribute geometrically to: $Z$~$G(p)$ . Note: formula for G-distribution: $P(Z=k)=p(1-p)^{k-1}$.
Questions: 1.let's toss the disc time after time until we get two black color in a row (for the first time). 1.a Find the probability function of the random variable: $T =${number of tosses until getting 2 black colors in a row for the first time}. Make sure there normalization properties exists.
this is what i have achieved so far: i know that i have to shoe that the sum of the probabilities of the experiment should equals to $1$.
$P(T=k)=((k-1)*(1-p)^{k-2}*p)*p$ the arguments in the brackets demonstrating one success of getting black color in $k-1$ tries. the otter $p$ present success in the $k$-ith. time. let's show normalization: $$\frac{p^2}{(1-p)^{2}}\sum_{k=1}^{\infty}(k-1)(1-p)^{k-2}$$ We know that $$\frac{1}{1-x}\sum_{n=0}^{\infty}x^n=> \frac {d}{dx}=\frac{1}{(1-x)^2}=\sum_{n=1}^{\infty}n \cdot x^{n-1}$$
we multiply both sides with $x^{2}$ and then we will get :$\frac {(1-p)^2}{(1-(1-p)^2}\frac{p^2}{(1-p)^2}=1$. this is my answer but my professor told me its wrong and i don't understand why. if anyone can please help me understand what's wrong or give me a hint or a solution to this problem will be grateful.
Let $a_k=P(T=k)$. You can show that $$ a_k =(1-p)a_{k-1}+p(1-p)a_{k-2},\qquad k>2 $$ Why? There are two ways to have a sequence of $k>2$ coin flips whose first occurrence of $BB$ is at flips $k-1$ and $k$. Either you start with a white flip $W$, and then follow it up with a sequence which gets its first $BB$ at flips $k-2$ and $k-1$, or you start with $BW$ and get a sequence of $k-2$ flips ending in $BB$. You cannot start with $BB$, since that would imply $T=2$, and we are assuming $k>2$.
Combined with the base cases $a_1=0$, $a_2=p^2$, the above is a linear recurrence which can be solved using the methods in this article.