Calculate the odds of a single streak of at least k heads out of n coin tosses given the probability of heads (tails) is p (q = 1-p).
Arguments
- num_coins
integer, total number of coin flips
- min_heads
integer, minimum number of heads to to obtained in a single streak
- prob_heads
number, probability of obtaining a heads on a single coin toss
- .saved
data frame, contains previously computed probabilities for a given index; used to speed up recursion so not to recalculate every probability should an already seen scenario of num_coins, min_heads, and prob_heads arises.