Consecutive Heads/Tails in weighted coin toss

Hi,

Can someone please help with this. I keep getting different answers to this from different people.

Supposing you have a weighted coin which lands heads up 70% of the time and tails up 30% of the time.

Q. What is the probability that it lands on **tails 20 or more** **times ****in a row** if I did this **1000 **times?

*Also could I have the equation on how you worked this out so that I can change the weighting, number of trials etc (I need to know this for my business!!!)

Thank you very much.

Zak

Re: Consecutive Heads/Tails in weighted coin toss

Hi, great answer from awkward. But how did you figure out the expected number of runs of R or more successive tails:

\lambda = p^R \,[(N - R) q + 1].

You derived this formula from scratch. I tried to figure by myself this result and tried to Google it and did not find an answer.

Could you share your Derivation ?

Thanks

Otto

Re: Consecutive Heads/Tails in weighted coin toss

The chance of getting 20 tails in a row in 20 tosses is 0.3^{20}. When tossing a coin 1000 times there is are (1000-20+1)=981 times where you can have 20 of an outcome in a row. Since it is 20 or more we don't care what the other 980 tosses are.

Since the chance of getting 20 in a row in one attempt is 0.3^{20} and you get 981 attempts the chance of getting 20 in a row through the whole 1000 tosses is 981(0.3^{20})

Re: Consecutive Heads/Tails in weighted coin toss

Quote:

Originally Posted by

**ottof** Hi, great answer from awkward. But how did you figure out the expected number of runs of R or more successive tails:

$\displaystyle \lambda = p^R \,[(N - R) q + 1]$

You derived this formula from scratch. I tried to figure by myself this result and tried to Google it and did not find an answer.

Could you share your Derivation ?

Thanks

Otto

Let

$\displaystyle X_i = \begin{cases} 1 &\text{if there is a run of at least R tails starting with flip i}\\0 &\text{otherwise} \end{cases}$

Then $\displaystyle X_1 = 1$ if the first R flips are tails,

but for $\displaystyle i > 1$, $\displaystyle X_i = 1$ if the (i-1)st flip is a head and the next R flips are tails.

So

$\displaystyle E(X_1)=\Pr(X_1 = 1) = p^R$

and

$\displaystyle E(X_i)=\Pr(X_i = 1) = q p^R$ for $\displaystyle i > 1$

Applying the theorem that E(X+Y) = E(X) + E(Y), we have

$\displaystyle E \left( \sum_{i=0}^{N-R+1} X_i \right) = \sum_{i=0}^{N-R+1} E(X_i) = p^R + (N-R)q p^R = p^R [(N-R)q + 1]$