probability dice experiment I am currently taking a probability course and I am stuck on a supposedly easy discrete probability question here:
Problem: Consider the experiment of rolling a fair die independently until the same number/face occurs 2 successive times and let $X$ be the trial on which the repeat occurs, e.g. if the rolls are $2,3,4,5,1,2,4,5,5$, then $X=9$. 
a. find the probability function $f(x) = P(X=x)$
b. compute EX
Attempt at a solution: I know $X$ is discrete probability distribution, and that we are dealing with independent events. However, $X$ can be anything, up to infinity, or it may never happen where there are two successive values. Here's what I got:
obviously, the answer is a geometric distribution as the answer is:
$P(X=x) = f(x) = (5/6)^(x-1) * (1/6)$ for $x = 0,1,2,3,...$ and $0$ otherwise but I'm stuck here. please help
 A: You could solve this directly, expressing your answer as a sum of the form$\sum\limits_{n=2}^\infty  n P[X=n]$. And, with a bit of work \, you could evaluate the sum explicitly (using the formula for the sum of a differentiated geometric series; see, e.g., the ideas here)).
The expected value  is $ \sum\limits_{n=2}^\infty n(5/6)^{n-2}(1/6)$. One can show this sum has value 7.

Or, you could find the expected value by conditioning on the result of the second roll: 
Let $X$ be the number of rolls to obtain the same result twice in a row.  Let $Y$ be the event that the second roll is the same as the first. Then
$$\eqalign{
\Bbb E(X) &= \Bbb E(X\mid Y)P(Y)+\Bbb E(X\mid Y^C)P(Y^C)\cr
&= \Bbb E(X\mid Y)\cdot{1\over 6}+E(X\mid Y^C)\cdot{5\over6}.
}
$$
But $\Bbb E(X\mid Y)=2$ and $E(X\mid Y^C)=\Bbb E(X)+1$ (here, it's as if you started playing the game at the start again on the second roll). So
$$\eqalign{
\Bbb E(X) &=  
 2\cdot{1\over 6}+(\Bbb E(X)+1)\cdot{5\over6}.
}
$$
Solving the above for $\Bbb E(X)$ gives
$$
\Bbb E(X)=7.
$$
A: This is basically a geometric distribution. At each step, independent of whatever happened previously, you have a $1/6$ chance of rolling the same as you did on the previous try. You keep going until you get a success, and you are counting the number of tries until a success. Let's call this random variable $Y$.
Now here comes the only twist: You start not on the first try (on which it is impossible to duplicate a previous roll), but on the second. So $X$ is one more than $Y$, hence $f_X(t)=f_Y(t-1)$, and $E(X)=E(Y+1)$.
