How many tosses to flip a coin HHTH?

  • I
  • Thread starter member 428835
  • Start date
In summary, the conversation discusses finding the expected number of flips to achieve a specific sequence of coin tosses (HHTH) with a given probability of heads. The method proposed is using Markov chains, but there is an error in the analysis. The conversation also touches on using expected values and infinite sums to approach the problem.
  • #36
WWGD said:
@PeroK : What part are you skeptical about?
All of it!

WWGD said:
There's always the non-elegant-but-sure way:
How is this a "sure" way, given that your attempt just gets immediately bogged down?
WWGD said:
1)It can be done after n throws, with probability $$P_n$$ with expected value $$ \Sigma n*P_n $$
How are you going to calculate ##P_n##?
WWGD said:
. It may get somewhat messy, but after 15 or so throws, $$ n*P_n $$ is small-enough that you can ignore it.
Given the expected value is ##18## throws, how can the probability become negligible after ##15## throws?
WWGD said:
And it seems some sort of recursion would help compute $$P_n$$.
"Some sort of recursion". Easy to say, but where's the attempted calculation?
WWGD said:
For $$n=4$$, the expected value contribution is :$$ 4*2^{-4}$$; for $$n=5: 5*2^{-5}$$. Then it becomes a bit more complicated, since you need to exclude the substring HHT at the beginning.
Calculating ##P_n = \frac 1 {16}## is something we can all see. It's trying to progress that method that's the problem.

It seems to me that you've been unable to make any progress with this "sure" method of calculation.
 
  • Skeptical
Likes WWGD
Physics news on Phys.org
  • #37
PeroK said:
All of it!How is this a "sure" way, given that your attempt just gets immediately bogged down?

How are you going to calculate ##P_n##?

Given the expected value is ##18## throws, how can the probability become negligible after ##15## throws?

"Some sort of recursion". Easy to say, but where's the attempted calculation?

Calculating ##P_n = \frac 1 {16}## is something we can all see. It's trying to progress that method that's the problem.

It seems to me that you've been unable to make any progress with this "sure" method of calculation.
It is the _ definition_ of expected number of throws until obtaining the string hhth. Specifically the sum n*Pn , where n is the number of throws and Pn is the probability of obtaining the substring hhth after n throws. And 15 is an estimate, for 15*P15 being small-enough to not contribute substantially to the sum. This is my version of thinking out loud and not intended as a rigorous solution, which I never claimed it was. And, BTW, your expression $$Pn =\frac{1}{16}$$ is meaningless, and not what I wrote. This is $$P_4$$, not $$P_n $$. And your claim about n=15 is a non-sequitur. This is a weighted sum.
 
  • Skeptical
  • Sad
Likes weirdoguy and PeroK
  • #38
Be sad if you will.
 
  • Sad
Likes weirdoguy and PeroK
  • #39
WWGD said:
There's always the non-elegant-but-sure way:
I'm afraid that I don't follow any of it. I interpret "non-elegant-but-sure" to imply that it is straightforward to understand.
WWGD said:
1)It can be done after n throws, with probability $$P_n$$ with expected value $$ \Sigma n*P_n $$ .
Sure, that is the definition of the expected value of something. If ##P_n## is the first hit on throw ##n##, then it is the desired answer.
WWGD said:
It may get somewhat messy, but after 15 or so throws, $$ n*P_n $$ is small-enough that you can ignore it.
How can that be? We have calculated answers of 18 for p=1/2 and of 1121.11111111111 for p=1/10. How can everything over 15 be ignored?
WWGD said:
And it seems some sort of recursion would help compute $$P_n$$.
Too vague. This is the heart of the problem and should not be passed over vaguely like this. The subject of Markov processes addresses this directly.
WWGD said:
For $$n=4$$, the expected value contribution is :$$ 4*2^{-4}$$; for $$n=5: 5*2^{-5}$$. Then it becomes a bit more complicated, since you need to exclude the substring HHT at the beginning.
I agree that it gets more complicated, but I am not sure how you solve it in a "non-elegant-but-sure" way that you seem to recommend.

This seems to be a fairly standard Markov process hitting time problem that can be solved with a transition matrix and an initial-state vector of probabilities that summarize the first 4 throws. But I have not done the work and am not really proficient in that subject. I would refer you to this reference
 
Last edited:
  • Like
Likes PeroK
  • #40
Thread closed temporarily for Moderation...
 
  • #41
The horse is sore and tired, so the thread will remain closed. Thanks folks.
 
  • #42
Update -- here is a related post from a different thread for folks' info:

1652113427602.png


Jarvis323 said:
The other thread was locked, but I calculated it as a Markov process like @FactChecker suggested based on this link.

https://mpaldridge.github.io/math2750/S08-hitting-times.html

Here is the Markov process I came up with.

View attachment 301120
The hitting time from state ##e## to state ##1101## is

\begin{split}
\mu_{e,1101} &= 1 + 0.5 \mu_{e,1101} + 0.5 \mu_{1,1101} \\
&= 1 + 0.5 \mu_{e,1101} + 0.5 ( 1 + 0.5 \mu_{e,1101} + 0.5 \mu_{11,1101} ) \\
\end{split}

Need to calculate ##\mu_{11,1101}## in terms of ##\mu_{e,1101}## to continue.

\begin{split}
\mu_{11,1101} &=1 + 0.5 \mu_{11,1101} + 0.5 \mu_{110,1101} \\
&= 1 + 0.5 \mu_{11,1101} + 0.5 ( 1 + 0.5 \mu_{e,1101} ) \\ &= 3 + 0.5 \mu_{e,1101} \\
\end{split}

Now substitute.

\begin{split}
\mu_{e,1101} &= 1 + 0.5 \mu_{e,1101} + 0.5 ( 1 + 0.5 \mu_{e,1101} + 0.5 ( 3 + 0.5 \mu_{e,1101} ) ) \\
&= 2.25 + 0.875 \mu_{e,1101} \\
&= 18 \\
\end{split}
 
  • Like
Likes weirdoguy, WWGD and FactChecker

Similar threads

  • Programming and Computer Science
Replies
10
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
897
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
858
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
4K
  • Precalculus Mathematics Homework Help
Replies
7
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
16
Views
2K
Back
Top