If you're assuming independence, then the number of replications (N) would be N = E{X)/p based on 5 tosses.
I really thought hard over this problem for about a hour or two. Here's the problem:
A coin has P(head) = p. Keep tossing until you finish a run of 5 heads (i.e., until you get a 5 heads in a row). Find the expected number of tosses it takes.
So's here's my work. I don't know if I am doing it correctly.
Using the definition of expected value:
EX = sum(x*P(X=x))
Where X is the number of tosses to get a run of 5 heads.
The probability of getting a run of 5 heads at
5 tosses (HHHHH): p^5
6 tosses (THHHHH): q*p^5
7 tosses (☐THHHHH) : (p+q)*q*p^5 = q*p^5 (since p+q=1)
8 tosses (☐☐THHHHH): (p+q)^2*q*p^5 = q*p^5
So, the expected value is:
EX = 5*p^5 + 6*q*p^5 + 7*q*p^5 + 8*q*p^5 + ...
Looks like the answer diverges, so I must be doing something wrong here.
Last edited by vxs8122; 09-08-2013 at 09:00 AM.
If you're assuming independence, then the number of replications (N) would be N = E{X)/p based on 5 tosses.
This is a very well-known, commonly asked Markov Chain problem. The number of tosses itself will follows a discrete phase-type distribution.
Without touching the notion of Markov Chain, you may just need the following "idea of regeneration" to solve this problem.
1. Note that forms a partition.
denotes equal in distribution; and those sequence are from results beginning from first toss.
Now you may use Law of total expectation to calculate .
hlsmith (09-12-2013)
BGM - answering probability problems, all day, everyday, with authority. I always look forward to your cryptic looking resolutions of countless (well maybe 2,500) probability problems. Some day I am going to invest some time and try to read all of your posts, so I can acquire a sound and well versed education in the ways.
Keep up the solid work (of having me scratch my head and say "what now")!
Stop cowardice, ban guns!
Tweet |