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)$.