1

For example: $“THHTHTTHHHTHTHTTHHTHT”$ contains 1 run of heads of length 3, 2 runs of length 2, and 4 runs of length 1.

Assuming $P(H) = p$ and $P(T) = (1-p)$, calculate (using properties such as conditional probability and Bayes’ Rule) the probability of runs of $H$eads of length $n$.

Where:
$P(H)$ is the probability of heads $(p)$
$P(T)$ is the probability of tails $(1-p)$

The implication that conditional probability and Bayes' Rule can be used would imply that this solution is much more simple than I am making it. That being said, numerous searches have returned complex solutions containing recursive functions, often the Fibonacci series. Furthermore, none of the solutions I have seen are consistent with one another.


From the derived equation, I know that I can then use the linearity of expectation to quickly solve for the probability of runs of length $k = 1, 2, ... 10$ for a total number of events (flips) $N >> 1$


What I could use assistance with is calculating runs of $H$eads of length n given the probabilities for heads $(p)$ and tails $(p-1)$.

Ryde91s
  • 83
  • 1
  • 6
  • Not quite, I'm looking for runs of exactly length n as opposed to >= n. The solution would be quite different, I would imagine. – Ryde91s Oct 03 '13 at 19:39
  • {length exactly n} = {length at least n} \ {length at least n+1}. – Did Oct 03 '13 at 19:41
  • @Did that would be an extraordinarily messy way of solving this, given the solution in your link. – Ryde91s Oct 03 '13 at 19:44
  • Furthermore, that is the probability that it exceeds some number, different question. – Ryde91s Oct 03 '13 at 19:50
  • "Furthermore"? You already said that (and I already answered). – Did Oct 03 '13 at 20:11
  • @Did no, they are different. The link shows the probability that it will exceed some length, m, and not that it will take on any particular length at all. Thanks for your help, but that link doesn't really do much for me. – Ryde91s Oct 03 '13 at 20:14
  • Well... if you do not see the relationship between the probability to exceed some length and the probability to take on some particular length (although I explained this relationship), what can I say? – Did Oct 03 '13 at 20:31
  • If you're not going to be kind, why bother. – Ryde91s Oct 03 '13 at 20:39
  • Sorry but I understand nothing from this conversation--hence indeed, it is probably better to stop it. Good luck to you in your inquiries. – Did Oct 03 '13 at 20:49
  • An unfortunate closure, so I will put the answer I had drafted in these comments. – Henry Oct 03 '13 at 20:53
  • It is unclear whether you want
    • the probability of exactly one run of $n$ Heads,
    • or of at least one run of $n$ Heads,
    • or the distribution of numbers of runs of $n$ Heads,
    • or the probability of a run of $n$ Heads starting at particular points,
    • or the expected number of runs of $n$ Heads.

    What follows looks at the last two of these, with $N$ being the total number of flips:

    – Henry Oct 03 '13 at 20:54
  • If $n \gt N$ then the expected number of runs of $n$ Heads is $0$.

    If $n = N$ then the expected number of runs of $n$ Heads is $2^{-n}$.

    If $0 \lt n \lt N$ then you have a run at the beginning with probability $2^{-n-1}$ or at the end with the same probability or in the middle starting at some particular point with probability $2^{-n-2}$ and there are $N-n-1$ possible middle locations, so the expected number of runs of $n$ Heads is $2^{-n-1} + (N-n-1)2^{-n-2} +2^{-n-1} = (N-n+3)2^{-n-2}$.

    – Henry Oct 03 '13 at 20:55
  • So in your example of $21$ flips, the expected number of runs of one Head is $2.875$, of runs of two Heads is $1.375$, of three Heads is $0.65625$, of four Heads is $0.3125$, etc. – Henry Oct 03 '13 at 20:56
  • @Henry Could you elaborate on the reasons why you see this closure as "unfortunate"? – Did Oct 04 '13 at 05:57
  • @Did: Three reasons: You were failing to communicate with Ryde91s, and the failure was not just on one side. The question being asked here is not the same as the linked question: Ryde91s did not seem to be asking just about the longest sequence. You closed this one 10 seconds before I tried to post a reply, which annoyed me. – Henry Oct 04 '13 at 06:34
  • @Henry: Thanks for answering, unfortunately I am not convinced to vote for reopening. "Communication", lack thererof: yes, and this supports the closure (15+ comments, real question still unknown, EVEN AFTER YOU POSTED YOUR COMMENTS, wow...). Not the same question: really? You mention FIVE different questions, which may be or may not be the question. How do you know this is not the same question? "Closure 10 seconds before": irrelevant (and rather bizarre, I must say). Note: check the way the site is functioning, you will see that I close nothing. – Did Oct 04 '13 at 07:13
  • @Did: I have been trying to be helpful and polite. – Henry Oct 04 '13 at 07:21
  • @Henry Congratulations. This does not allow you to air unsubstantiated slur on others' actions, especially when every fact you summon to justify the slur proves irrelevant or even wrong. – Did Oct 04 '13 at 07:25

0 Answers0