Two Plus Two Older Archives  

Go Back   Two Plus Two Older Archives > General Gambling > Probability
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-02-2003, 12:05 PM
irchans irchans is offline
Senior Member
 
Join Date: Sep 2002
Posts: 157
Default More Coin Filps

BruceZ solved the following coin toss question in this forum, "If you flip a coin until two heads occur in a row, what is the probability that you will flip the coin N times." His ingenious answer involves summing Fibonacci numbers.

I came across a very similar question on "google answers".

Consider a game where you flip a coin until you get two heads in a row.

1. How many tails on average will you flip before getting two heads in a row?

2. Let X be a random variable that counts the # of tails.
What is the distribution of X?


I was very surprised to find that this problem has a rather simple solution having nothing to do with Fibonacci numbers. I will post my "simple" solution in a couple of days if anyone is interested.

Reply With Quote
  #2  
Old 10-03-2003, 02:48 AM
crockpot crockpot is offline
Senior Member
 
Join Date: Jul 2003
Location: Urbana, IL
Posts: 2,899
Default Re: More Coin Filps

for x tails, each solution is of the form:

_T_T...T_THH, where there are x tails, and each _ represents either a head or no flip.

the probability of getting each of these distributions is 2^(x+2+# of heads), and there are (x nCr n) ways to get the number of distributions for n heads.

the probability of getting x tails is thus a binomial distribution:

1/2^(x+2) + (x nCr 1)/2^(x+3) + (x nCr 2)/2^(x+4)...+1/2^(2x+2).

This simplifies to:

1/2^2 * (1/2 + 1/2^2)^x

or 1/4 * (3/4)^x.

i'm too tired to work out the expected value for this right now.
Reply With Quote
  #3  
Old 10-03-2003, 09:07 AM
irchans irchans is offline
Senior Member
 
Join Date: Sep 2002
Posts: 157
Default crocksucker solution

Excellent solution crocksucker! That was much much shorter and better than my first solution. Your solution hinges on the observation that the length of the coin toss sequence is between 2 + #tails and 2 + 2*(#tails). [img]/images/graemlins/ooo.gif[/img] I never thought of that.


There still is a slightly simpler solution which does not use the binomial theorem or combinations.



Reply With Quote
  #4  
Old 10-03-2003, 12:43 PM
Copernicus Copernicus is offline
Senior Member
 
Join Date: Jun 2003
Posts: 1,018
Default Re: More Coin Filps

What does (x nCr n) represent?
Reply With Quote
  #5  
Old 10-03-2003, 05:09 PM
crockpot crockpot is offline
Senior Member
 
Join Date: Jul 2003
Location: Urbana, IL
Posts: 2,899
Default Re: More Coin Filps

number of combinations picking n items from x (aka x choose n, or (x!)/(x-n)!(n!))

i picked this notation because texas instruments uses it.
Reply With Quote
  #6  
Old 10-03-2003, 05:12 PM
crockpot crockpot is offline
Senior Member
 
Join Date: Jul 2003
Location: Urbana, IL
Posts: 2,899
Default Re: crocksucker solution

hmm, let me take a shot...

the ratio between the probability of (x+1) tails and x tails should remain constant for all x. therefore, since the probability of getting 0 tails is 1/4, the ratio must be 3/4 in order to make the sum of the infinite series equal to 1.
Reply With Quote
  #7  
Old 10-03-2003, 05:17 PM
Copernicus Copernicus is offline
Senior Member
 
Join Date: Jun 2003
Posts: 1,018
Default Re: More Coin Filps

[ QUOTE ]
number of combinations picking n items from x (aka x choose n, or (x!)/(x-n)!(n!))

i picked this notation because texas instruments uses it.

[/ QUOTE ]

I thought it must be something more complex than C(x,n), since I'm not sure the solution is right then. I'll have to think about it more but off the top of my head that gives too much freedom to the Heads, allowing HH to be selected.
Reply With Quote
  #8  
Old 10-03-2003, 05:56 PM
Copernicus Copernicus is offline
Senior Member
 
Join Date: Jun 2003
Posts: 1,018
Default Re: crocksucker solution

[ QUOTE ]
hmm, let me take a shot...

the ratio between the probability of (x+1) tails and x tails should remain constant for all x. therefore, since the probability of getting 0 tails is 1/4, the ratio must be 3/4 in order to make the sum of the infinite series equal to 1.

[/ QUOTE ]

Good observation I think, and knowing that carries you to the answer of the original question.

The ratio of the terms in the probability distribution of getting to each flip is 3/4, but the expected number of Tails has each term in that sum weighted by the number of Tails . Ie E(T)=(0*1/4 + 1 * (1/4 * 3/4) + (2 * 1/4 * (3/4)^2)....

Using the methodology in the dice thread the answer to the expected number of Ts is 3. Is that reasonable?

P(0)=1/4
P(1)=3/16
P(2)=9/64
P(3)=27/256
P(4)=81/1024
P(5)=and so on

Weighting the probabilities by that number of Ts till T=10 gets to 2.4 o 2.5 (I did the math fast and got 2 different answers) so taking it to infinity looks close to 3 to me.
Reply With Quote
  #9  
Old 10-03-2003, 06:06 PM
irchans irchans is offline
Senior Member
 
Join Date: Sep 2002
Posts: 157
Default crocksucker 2nd solution

[ QUOTE ]

the ratio between the probability of (x+1) tails and x tails should remain constant for all x. therefore, since the probability of getting 0 tails is 1/4, the ratio must be 3/4 in order to make the sum of the infinite series equal to 1


[/ QUOTE ]

That is a great, short answer using just one observation and one simple infinite sum. How would you prove the observation "the ratio between the probability of (x+1) tails and x tails should remain constant"?



Reply With Quote
  #10  
Old 10-03-2003, 06:43 PM
crockpot crockpot is offline
Senior Member
 
Join Date: Jul 2003
Location: Urbana, IL
Posts: 2,899
Default Re: crocksucker 2nd solution

it helps to think of the sequences with (x+1) tails as all sequences of x tails, with HT or T added before them. conveniently this also gives you the ratio of 3/4 if you work it out, since the T... will occur with 1/2 the probability of the x tails, and the HT.... with 1/4 the probability.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:35 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.