The probability of getting n consecutive heads is P(n heads) = 1/5 * 1 + 4/5 * (1/2)^n, Thus, the probability of getting a head on the n+1st roll given that you have gotten heads on all n previous rolls is P(n+1 heads | n heads) = P(n+1) / P(n) = ( 1/5 * 1 + 4/5 * (1/2)^(n+1) ) / ( 1/5 * 1 + 4/5 * (1/2)^n ). Multiplying numerator and denominator by 5* 2^(n-1) and recognizing 4 as 2^2 gives P(n+1 heads | n heads) = (2^(n-1) + 1) / (2^(n-1) + 2).
Dave On Aug 9, 12:30 am, programming love <love.for.programm...@gmail.com> wrote: > @Dave: I guess 17/18 is correct. Since we have to *calculate the probability > of getting a head in the 6th flip given that first 5 flips are a head*. Can > you please explain how you got the values of consequent flips when you said > this? > > *"In fact, the probability is 3/5 for the first flip. After a head is > flipped, the probability of a head is 2/3. After two heads have been > flipped, it is 3/4. After 3 heads, it is 5/6. After 4 heads, the > probability is 9/10, and after 5 heads, the probability is 17/18."* -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.