7 fair coins and 3 coins with probability for heads of 0.7 are mixed. One random coin is drawn, and flipped until 3 heads are flipped. What is the probability mass function of the number of tosses needed until 3 heads are flipped, and what is the expected number of flips required for 3 heads?
I'm having difficulties writing the pmf of the number of tosses required. The probability of selecting a fair coin is 0.7, P(unfair coin) is 0.3. Furthermore, by the geometric random variable, $$ p(x)=(1-p)^{x-1} $$ so my logic is it is equal to $$ 0.7(1-0.5)^{x-1}*0.3(1-0.7)^ {x-1}$$ and the expected value is 1/p, which is $$3/(0.7*0.5)=20$$ I'm unsure whether my thought process was correct because the PMF looks different from what I have seen before.
Thanks in advance!