I've been grappling with this one combinatorially, but I'm still not sure I have it, and wanted to see if anyone could provide a nice closed form solution.

Suppose we have a biased coin that lands heads with probability p and tails with probability (1 - p). If we flip the coin x times, what's the probability that there is some run of n consecutive flips in which the coin lands heads m times? (The m heads need not be consecutive, and obviously x ≥ n ≥ m.)

Sorry if this has already been asked - a brief search didn't turn anything up.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.