IIRC this is a standard problem in digital communications theory, so you might want to look for literature in that arena.

Carl


> Can someone recommend a method to answer the following type of
> question:
>
> Suppose I have a coin with a probability hhh of coming up heads
> (and 1-hhh
> of coming up tails)
> I plan on flipping the coin nnn times (for example, nnn = 500)
> What is the expected probability or frequency of a run of rrr
> heads* during
> the nnn=500 coin flips?
> Moreover, I would probably (excuse the pun) want the answer for a
> range of
> rrr values, for example rrr = 0:50
>
> Of course I am more interested in an analytical solution than a
> monte carlo
> simulation solution.

I think this is a relatively deep problem analytically, and there appears to
be a substantial amount of literature. Googling on ``probability of a sequence
of runs'' got a lot of hits, including a pointer to

        http://mathworld.wolfram.com/Run.html

which gives some interesting discussion and provides a number of references.
(Feller volume 1 seems to be a good place to start, as usual.)

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to