You have a coin that shows tails with probability $0.125.$ You play a game where you flip the coin until tail appears for the $5th$ time. Let $M$ denote the number of flips in this game.
$b)$ Compute $E[M]$
$c)$ Compute $P[M=5]$ and $P[M=6]$
My Working:
Let $X$ be random variable represent the number of tails occured then $X$~$BIN(0.125)$ with $p=0.125$ be probability success. Let $M$ be total number of trials, then pdf is given by:
$f(x)$=$M \choose 5 $ $0.125^{5}$$(1-0.125)^{M-5}$
My questions is from here how do I find $E(M)$, since we find expectation of random variable which is $X$ here. May be I am making mistake in constructing pdf. Once I have pdf it is easy to answer both questions. please guide me in this matter.