A coin having probability $p$ of coming up head is to be successively flipped until the first head appears.
- find the probability that the first head occurs in odd number of tosses ?
- find the expected number of flips required for the first head ?
the solution for number 1 $p(1 + (1-p)^2 + (1-p)^4 + \ldots) = p\displaystyle\sum_{i=0}^\infty ((1-p)^2)^i = \frac{p}{1-(1-p)^2} = \frac{1}{2-p}.$
the solution for number 2
$\sum\limits_{i=1}^\infty i p (1-p)^{i-1}=\frac{1}{p}~~~~~~~$
is this the right answer for this problem and thank you
Both are correct.
As a way to avoid the use of infinite series:
For the first note that we either win on the first roll, lose on the second, or reset. Thus, letting $\Psi$ denote the answer, we have $$\Psi=p+(1-p)p\times 0+(1-p)^2\Psi\implies \left(1-(1-p)^2\right)\Psi=p\implies \Psi=\frac p{1-(1-p^2)}$$
For the second note the recursive relation $$E=p\times 1 +(1-p)\times (E+1)\implies pE=1\implies E=\frac 1p$$