# Probability that k or more i.i.d. Bernoulli random variables are realized 'success'

Let $X_n\sim \operatorname{Bern}(p)$.

How does one calculate that there will be $k$ more more successes in a row? I can only think of taking the complement of the Geometric c.d.f.. $$1-\sum_{i=0}^{k-1} p^i(1-p)$$

But this can get tedious for a large $k$.

-
Are you looking for something like this: math.stackexchange.com/questions/59738/… ? – Byron Schmuland Sep 4 '12 at 2:34
@ByronSchmuland: I think my proposition is simpler because I am not looking for the probability of the longest run exceeding a value but the probability that there will k or more consecutive successes. I'm not sure if they are different propositions, though. – Wuschelbeutel Kartoffelhuhn Sep 4 '12 at 2:40
Out of how many trials? – Sasha Sep 4 '12 at 2:44
@Sasha: I run the experiment, if there is failure. I restart a chain and record the previous chain (with 0 successes), if there are two consecutive successes followed by one failure in the next chain, I stop again and start a new (third) chain. Now I evaluate an infinite number of these chains and count what fraction of these chains have k or more successes. – Wuschelbeutel Kartoffelhuhn Sep 4 '12 at 2:47
@Sasha : Since he used the word "geometric", I'm assuming that the number of trials is precisely the thing that is random. You just keep going until you get the first failure. – Michael Hardy Sep 4 '12 at 2:48

If the probability of success on each trial is $p$, then the probability that the first $k$ trials are successes is $p^k$. That's the probability that the length of the initial run of successes has length $k$ or more.