Let's assume we have an unfair coin and a machine that toss it continuously. We counted the number of tandem heads. Whenever it's head we count 1, if it's head again, counter goes to two and so on. When we get our first tail, it reset to zero.
Here's the result of tossing: [H,H,T,H,H,H,T,H,T,T]
Collected data: [1,2,0,1,2,3,0,1,0,0]
The thing I'm interested in is to read the past x readings and predict the next tossing result.
For example, assuming this data, the maximum number or continuous heads in the past 5 readings was 3, how can we translate it to a probability of the next tossing.