I'm looking for a method to measure the "randomness" of successes in a series of trials with a known but non-constant probability. In particular, I'm looking to understand the probability of runs of successes. Previously, I implemented the solution outlined here:Probability for the length of the longest run in $n$ Bernoulli trials
What I found, however, is that my sample set contains frequent improbable runs in large n series of trials. And deMoivre's formula doesn't measure the probability of the batch itself containing multiple runs.
For that reason, I built a poor man's markov chain to measure the probability of the k longest runs with differing lengths. However, the datasets I have have contain frequent improbable runs in large n batches and its computationally intensive.
As a caveat, it's the runs, or orderliness of the series, that is important to measure, not the sum of successes in a series of trials compared to the expected outcome.
Can anyone point me in the right direction to approximate this solution without running simulations?