Let's say I have a biased coin that has a probability of 0.2 for heads and 0.8 for tails. If you flip it 6 times without getting a heads however, the probability of heads increases by 0.2 per non-heads flip afterwards, so the 7th flip without heads will have a probability of 0.4 for heads and 0.6 for tails, the 8th flip will have a probability of 0.6 for heads, and the 10th flip will have a guaranteed chance for heads. If you get heads at any point, the probability resets back to 0.2, and you would have to roll 6 tails again to raise the probability.
In this scenario, what is the best way to calculate the probability of getting X amount of heads with an arbitrary number of coin flips? For example, how might I calculate the probability of getting 2 heads from 10 flips with this coin?
So far, I've tried brute-force simulation and dynamic programming, which certainly work, but I just wondered if there was a more direct and efficient approach. I've looked into using discrete Fourier transforms on rolling multiple dice, but I've found that the problem doesn't exactly translate one-to-one with the one here.
I'm not too knowledgeable about probability and math in general, so I hope someone more knowledgeable could offer some suggestions or insights. Thanks for the help!