Expected Number of Flips for Biased Coin | Homework Question

  • Thread starter ephedyn
  • Start date
So E[N] = ƩNP[N] = ƩNP[N|H]P[H]+ P[N|T]P[T] = P[H]E[N|H]+ P[T]E[N|T].In summary, the expected number of flips to land a match to the initial flip is 2, while the expected number of flips to land a different side from the initial flip is (2p^2-2p+1)/(p(1-p)). For extreme values of p, this value grows asymptotically, making it nearly impossible to land the other side on a flip. The approach of taking P[H] \times E[N_H] + P[T] \times E[N_T]
  • #1
ephedyn
170
1
Homework Statement
A biased coin lands heads with probability p and tails with probability 1-p.

(1) What is the expected number of flips, after the initial flip, to land a match to the initial flip?
(2) What is the expected number of flips, after the initial flip, to land a different side from the initial flip? Comment on the extreme values of [itex]p[/itex].

The attempt at a solution
Without loss of generality, assume we land heads on the initial flip. Let [itex]N_H[/itex] be the number of flips required until we land heads again. Since [itex]N_H[/itex] is a geometric random variable, with pmf [itex]f(x) = p(1-p)^{x-1}[/itex], then [tex]E[N_H]=\sum^{\infty}_{x=1} x \cdot f(x)= \sum^{\infty}_{x=1} px(1-p)^{x-1}=\dfrac{p}{1-(1-p)^2}=\dfrac{1}{p}[/tex] and similarly we have [itex]\dfrac{1}{1-p}[/itex] for tails. Let [itex]H[/itex] and [itex]T[/itex] denote the event of landing heads and tails on the initial flip respectively.

So (1) for matching flips, the expected number of flips is [tex]P(H) \times \dfrac{1}{p} + P(T) \times \dfrac{1}{1-p} = p \times \dfrac{1}{p} + (1-p) \times \dfrac{1}{1-p}=2[/tex].

Similarly, (2) for different flips, the expected number of flips is [tex]P(T) \times \dfrac{1}{p} + P(H) \times \dfrac{1}{1-p} = \dfrac{1-p}{p} + \dfrac{p}{1-p}=\dfrac{p^2+(1-p)^2}{p(1-p)}=\dfrac{2p^2-2p+1}{p(1-p)}[/tex]

For the extreme cases, by L'Hopital's rule, we have [tex]\lim_{p\rightarrow0} \dfrac{2p^2-2p+1}{p(1-p)}=\lim_{p\rightarrow0} \dfrac{4p-2}{1-2p}=-2[/tex] and similarly, [tex]\lim_{p\rightarrow1} \dfrac{4p-2}{1-2p}=-2[/tex]

So I realize I must be doing something wrongly because I'm getting negative expectation values in the final part. Any guidance on my working?

Thanks!
 
Physics news on Phys.org
  • #2
ephedyn said:
Homework Statement
A biased coin lands heads with probability p and tails with probability 1-p.

(1) What is the expected number of flips, after the initial flip, to land a match to the initial flip?
(2) What is the expected number of flips, after the initial flip, to land a different side from the initial flip? Comment on the extreme values of [itex]p[/itex].

The attempt at a solution
Without loss of generality, assume we land heads on the initial flip. Let [itex]N_H[/itex] be the number of flips required until we land heads again. Since [itex]N_H[/itex] is a geometric random variable, with pmf [itex]f(x) = p(1-p)^{x-1}[/itex], then [tex]E[N_H]=\sum^{\infty}_{x=1} x \cdot f(x)= \sum^{\infty}_{x=1} px(1-p)^{x-1}=\dfrac{p}{1-(1-p)^2}=\dfrac{1}{p}[/tex] and similarly we have [itex]\dfrac{1}{1-p}[/itex] for tails. Let [itex]H[/itex] and [itex]T[/itex] denote the event of landing heads and tails on the initial flip respectively.

So (1) for matching flips, the expected number of flips is [tex]P(H) \times \dfrac{1}{p} + P(T) \times \dfrac{1}{1-p} = p \times \dfrac{1}{p} + (1-p) \times \dfrac{1}{1-p}=2[/tex].

Similarly, (2) for different flips, the expected number of flips is [tex]P(T) \times \dfrac{1}{p} + P(H) \times \dfrac{1}{1-p} = \dfrac{1-p}{p} + \dfrac{p}{1-p}=\dfrac{p^2+(1-p)^2}{p(1-p)}=\dfrac{2p^2-2p+1}{p(1-p)}[/tex]

For the extreme cases, by L'Hopital's rule, we have [tex]\lim_{p\rightarrow0} \dfrac{2p^2-2p+1}{p(1-p)}=\lim_{p\rightarrow0} \dfrac{4p-2}{1-2p}=-2[/tex] and similarly, [tex]\lim_{p\rightarrow1} \dfrac{4p-2}{1-2p}=-2[/tex]

So I realize I must be doing something wrongly because I'm getting negative expectation values in the final part. Any guidance on my working?

Thanks!

L'Hospital's rule does not apply, because you do not have something like 0/0 or ∞/∞.
 
  • #3
Ah! You're right! So I have the expected number grow asymptotically in both cases. Makes sense intuitively, since it should become nearly impossible to land the other side on a flip. Thanks!

Does the rest of my approach make sense? I'm not too convinced about taking [itex]P[H] \times E[N_H] + P[T] \times E[N_T][/itex] because a property that allows me to do this seems to be missing from my memory.
 
  • #4
Fwiw, your answer can be written as p/(1-p) + (1-p)/p.
ephedyn said:
Does the rest of my approach make sense? I'm not too convinced about taking [itex]P[H] \times E[N_H] + P[T] \times E[N_T][/itex] because a property that allows me to do this seems to be missing from my memory.
Yes, that's fine. You can justify it by considering the prob that it takes N tosses given the outcome of the initial toss, P[N|H], P[N|T]. P[N] = P[N|H]P[H]+ P[N|T]P[T]. E[N|H] = ƩNP[N|H], etc.
 

1. What is a coin flipping question?

A coin flipping question is a hypothetical question that involves the flipping of a coin to determine the outcome of a situation or decision. It is often used as a way to make a decision when there are two equally likely options.

2. How does a coin flipping question relate to science?

Coin flipping questions can be used in scientific experiments as a way to randomly assign participants to different groups or conditions. This helps to eliminate bias and ensure that the results of the experiment are valid.

3. Is a coin flipping question a reliable method of decision making?

While coin flipping can be a fun and simple way to make a decision, it is not always the most reliable method. It is important to consider other factors and gather more information before making a decision based solely on the outcome of a coin flip.

4. Can a coin flipping question be used in statistical analysis?

Yes, coin flipping questions can be used in statistical analysis to simulate random events and calculate probabilities. This can be helpful in understanding the likelihood of certain outcomes in a given situation.

5. Are there any ethical concerns with using a coin flipping question in research?

As with any research method, it is important to consider ethical concerns when using a coin flipping question. This includes ensuring that participants have given informed consent and that the question is not biased in any way that could harm the participants.

Similar threads

  • Calculus and Beyond Homework Help
Replies
10
Views
2K
  • Calculus and Beyond Homework Help
Replies
15
Views
2K
  • Set Theory, Logic, Probability, Statistics
2
Replies
41
Views
4K
  • Calculus and Beyond Homework Help
Replies
6
Views
158
  • Programming and Computer Science
Replies
10
Views
981
  • Precalculus Mathematics Homework Help
Replies
4
Views
3K
  • Calculus and Beyond Homework Help
Replies
3
Views
2K
  • Math Proof Training and Practice
2
Replies
61
Views
6K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Math Proof Training and Practice
2
Replies
60
Views
8K
Back
Top