1
$\begingroup$

This question already has an answer here:

I've an unfair coin which has the probability of the head =70%, I toss the coin the first time and I get a tail. Now how many time do I need to flip the coin so that the number of heads is equal to the number of tails.

My solution: As I already have one tail, I need n-1 tail and n heads. If I have 3 coin tosses, I expect 2.1 expectations of heads and 0.9 of tails expectation. So I answered 3. I'm not sure if this is the right way to solve, feel free to clarify anything that seems unclear

$\endgroup$

marked as duplicate by José Carlos Santos, Leucippus, max_zorn, ArsenBerk, Shailesh Oct 6 '18 at 10:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ @RushabhMehta Not so sure. The bias of the coin matters a lot. For a fair coin, the expectation need not even be defined. See, e.g., this question. Here, the bias of the coin is probably good enough to get a finite answer. $\endgroup$ – lulu Oct 5 '18 at 15:47
2
$\begingroup$

Suppose the answer you seek is $E$. Consider what happens on the first toss. Either you get $H$ and can stop or you get $T$. In the latter case, you now have twice as long to wait as you must first get back to a deficit of just $1$ and then pass to even. Each of those steps is expected to take $E$ turns

Considering the probabilities of each scenario we get $$E=.7\times 1+.3\times (2E+1)\implies \boxed {E=\frac 52}$$

$\endgroup$
  • $\begingroup$ Thanks @lulu for your response, could you elaborate a bit more on the 2E+1? Does this involve a Markov chain? $\endgroup$ – user23564 Oct 5 '18 at 15:55
  • 1
    $\begingroup$ Well, sure. But there is no need to evoke any heavy machinery. If you are walking from $A$ to $C$ and must pass through $B$ then your expected time is the sum of your expected times from $A$ to $B$ and from $B$ to $C$. As simple as that. $\endgroup$ – lulu Oct 5 '18 at 16:01
  • 1
    $\begingroup$ Read the accepted solution to the question I linked to in the comments. There the same recursion is used (the different multiplicative factors just reflect the different probabilities of Heads and Tails) though in that case the recursion has no solution, so there is no finite expectation. As I suggested, the difference here is that the bias in your coin changes the situation. $\endgroup$ – lulu Oct 5 '18 at 16:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.