6
$\begingroup$

Q. A fair coin is tossed untill head appears for the first time. What is probability that the number of tosses required is odd?

My work:

suppose that head comes in first toss so probability of getting head in the first toss $=\dfrac{1}{2}$

suppose that first & second tosses show tails & third toss shows head so probability of getting head in the third toss $=(1-\dfrac12)(1-\dfrac12)\dfrac{1}{2}$ $=\dfrac1{2^3}$

suppose that first 4 tosses show tails & fifth toss shows head so probability of getting head in the fifth toss $=(1-\dfrac12)^4\dfrac{1}{2}$ $=\dfrac1{2^5}$

suppose that first 6 tosses show tails & seventh toss shows head so probability of getting head in the fifth toss $=(1-\dfrac12)^6\dfrac{1}{2}$ $=\dfrac1{2^7}$

…………….

and so on

But I am not able to find the final probability of getting head first time so that the number of tosses required is odd. what should do I next to it? please help me.

$\endgroup$
  • 5
    $\begingroup$ You're almost there. Just recognize that you have a geometric series and take its sum. To allow you to check your work, the answer will be $\frac 23$. $\endgroup$ – Robert Shore Jul 3 at 4:06
  • 1
    $\begingroup$ This is an exact duplicate of math.stackexchange.com/q/834344/117057 , which unfortunately doesn't have an accepted answer. $\endgroup$ – shoover Jul 3 at 22:27
17
$\begingroup$

You have a geometric series,

$$\frac12+\frac1{2^3}+\frac1{2^5}+\frac1{2^7}+\ldots=\sum_{n\ge 0}\frac12\cdot\left(\frac14\right)^n=\frac{\frac12}{1-\frac14}=\frac23\;.$$

Alternatively, if $p$ is the desired probability, then $p=\frac12+\frac14p$: with probability $\frac12$ you get a head on the first toss, and with probability $\frac14$ you start with two tails and are now in exactly the same position that you were in at the beginning. Solving this for $p$ again yields $p=\frac23$.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ thank for your answer $\endgroup$ – user805532 Jul 3 at 4:36
  • 1
    $\begingroup$ Your second method is very simple. I have never thought of it. Hats off to you sir $\endgroup$ – user801303 Jul 3 at 4:44
  • 1
    $\begingroup$ @PaulAldrin: You’re welcome. $\endgroup$ – Brian M. Scott Jul 3 at 4:44
  • 1
    $\begingroup$ @TShiong: When you can find a recurrence like that, it usually makes things a lot simpler! $\endgroup$ – Brian M. Scott Jul 3 at 4:45
7
$\begingroup$

Your approach is good and will get you the right answer. Just realize that you're building a geometric series and you want its sum.

I'm drafting an answer to give you an alternative approach. Let $p$ be the probability you're looking for. Then your first flip will be heads with probability $0.5$. If it's tails, then you will solve your original problem (the first heads occurs on an odd toss) exactly when, from your new starting point, your first heads occurs on an even toss, which happens with probability $1-p$.

That means $p = 0.5 + 0.5(1-p) \Rightarrow 1.5 p = 1 \Rightarrow p = \frac 23$.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ thank for your answer $\endgroup$ – user805532 Jul 3 at 4:37
  • $\begingroup$ haven't you used sum of infinite GP? $\endgroup$ – user805532 Jul 3 at 4:38
  • $\begingroup$ No, I think I've provided an alternative approach that avoids the need, just as does the alternative solution provided by Brian M Scott. $\endgroup$ – Robert Shore Jul 3 at 8:35
2
$\begingroup$

Here's another way to solve the problem by considering pairs of tosses at a time instead of single tosses.

Let $\sigma$ be an arbitrary infinite sequence of heads and tails. $\sigma$ uses 1-based indexing.

$$ \text{e.g.}\;\;\; \sigma = HTHTHTHTHTTTTTHHHH\cdots $$

Imagine grouping the elements of $\sigma$ into pairs.

$$ \sigma = HT,HT,HT,HT,HT,TT,TT,HH,HH\cdots $$

Let's imagine we have three states, $S$, $E$, and $O$.

  • $S$ is the start state, we haven't seen a head yet.
  • $E$ is the state marking that we saw a head at an even index first.
  • $O$ is the state marking that we saw a head at an odd index first.

$E$ and $O$ are both absorbing states. Once we enter one of those states, we are never going to leave it.

Our state at the beginning of our process is always $S$ because, initially, we haven't observed any tosses at all of our coin.

Next let's consider what happens when we read our first toss-pair from $\sigma$.

There are twice as many ways to transition from $S$ to $O$ than there are to transition from $S$ to $E$.

     TT
S  ----->   S

     TH
S  ----->   E

     HT
S  ----->   O

     HH
S  ----->   O

As the number of pairs processed approaches infinity, the probability that the current state is $S$ approaches zero.

However, the ratio of the probability that that the current state is $O$ is always twice the probability that the current state is $E$.

Therefore, the limiting probability that the state is $O$ is $2/3$

| cite | improve this answer | |
$\endgroup$
1
$\begingroup$

You are almost done. Add all the terms

$$\frac12+\frac1{2^3}+\frac1{2^5}+\frac1{2^7}+\ldots$$ above series is an infinite GP with first term $a=\dfrac{1}{2}$ and common ratio $r=\dfrac{1}{4}$ $$\dfrac{a}{1-r}$$

$$=\frac{\frac{1}{2}}{1-\frac{1}{4}}$$$$=\frac23$$

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ does this really have infinite terms which can be added? $\endgroup$ – user805532 Jul 3 at 4:38
  • 1
    $\begingroup$ Of course it has uncountable number of terms. I 've added them in my answer $\endgroup$ – user801303 Jul 3 at 4:40
  • 3
    $\begingroup$ it's of course countable $\endgroup$ – RiaD Jul 3 at 12:58
  • $\begingroup$ @PaulAldrin none of the terms are infinite in value, but they are infinitely many. Name a large odd number n and I can respond with a term $1/2^n$. $\endgroup$ – neptun Jul 3 at 13:09
  • 1
    $\begingroup$ r should be 1/4, not 1/2 $\endgroup$ – Mark Pattison Jul 3 at 13:32
0
$\begingroup$

Another way to avoid summing a GP.

The probability of the first head happening on toss $n$ is $(1/2)^{n}$. Let $A$ be the event that the first head occurs on an odd toss, and $E_k$ be the event that it occurs either on toss $2k+1$ or $2k+2$. Now $$P(A\mid E_k)=\frac{(1/2)^{2k+1}}{(1/2)^{2k+1}+(1/2)^{2k+2}}=\frac{2}{3},$$ independently of $k$. Since exactly one of the $E_k$ will occur almost surely, we have $$P(A)=\sum_kP(A\mid E_k)P(E_k)=\sum_k\frac23P(E_k)=\frac23\sum_kP(E_k)=\frac23.$$

| cite | improve this answer | |
$\endgroup$