Question 1024672: A fair coin is tossed until x heads are found in a row. On average how many total flips will it take to get x heads in a row?
Answer by mathmate(429) (Show Source):
You can put this solution on YOUR website!
Question:
A fair coin is tossed until x heads are found in a row. On average how many total flips will it take to get x heads in a row?
Solution:
Take the particular case of 10 heads in a row.
For a fair coin, on average, half the flips result in heads.
So over 18 throws, we have 9 heads (on average). To achieve 10 heads, the 19th throws must be a head to fulfill 10 heads, with probability of 0.5.
Generalizing, and on average, we need 2x-1 flips to get x heads.
Looking at it in a more theoretical way, the problem can be modelled using the negative binomial distribution.
The probability density function is given by
P(a,n)=
where C(a+b-1,a-1)=(a+b-1)!/((a-1)!b!)
and
a=number of successes
b=number of failures
meaning n=a+b=number of flips.
The distribution function is the sum of the probabilities for which k=0 to b, where k is the number of failures.
The average value of flips is such that the distribution function equals 0.5.
For a fair coin with p=0.5, b=a-1, hence n=a+b=2a-1.
For more detailed discussion, Google the subject, or start by reading:
http://mathworld.wolfram.com/NegativeBinomialDistribution.html
https://onlinecourses.science.psu.edu/stat414/node/80
https://www.me.utexas.edu/~jensen/ORMM/computation/unit/rvadd/discrete_dist/neg_binomial.html
|
|
|