Calculate the probability of an event occurring AT LEAST x times over n trials? Forgive me if this is simple, but I've been twisting around this problem for a bit.
I know how to calculate if a given event happens exactly $x$ times over $n$ trials (where $p$ is the probability of the event occurring during a single trial):
$$p^x (1-p)^{n-x}$$
It seems like I could get the result of it occurring at least $x$ times by doing a sum...
$$\sum_{q=0}^{n-x} p^{x+q}  (1-p)^{n-(x+q)}$$
... But I'm assuming there's a simpler way, mathematically, to go about calculating this.  Can anyone enlighten me?
 A: No simpler general formula than
$$\sum_{k=x}^{n}{n\choose k} p^{k}  (1-p)^{n-k}$$
Of course, if $n$ and $x$ go to infty, this is another story. For example, if $n\to\infty$, $x\to\infty$, and $x/n\to r$ for some fixed $r$ in $[0,1]$, then the sum converges to $1$ for every $r\lt p$, to $\frac12$ for $r=p$, and to $0$ for every $r\gt p$.
Edit (to answer a comment): Recall that $0!=1$ hence, in the sum above, the $k=n$ term is
$$
{n\choose n} p^{n}  (1-p)^{n-n}=1\cdot p^n\cdot(1-p)^0=p^n.
$$
A: The formula you are using is the same as 1 minus the cumulative binomial distribution function. If you are have a calculator/programming-language you can use that, without doing any iterative calculations yourself.
Cumulative binomial distribution function is at most k events
$$\texttt{atMost}(k,n,p) = \texttt{cumBinomDist}(k,n,p) \\
 = \Pr(X \le k) = \sum_{i=0}^{\lfloor k \rfloor} {n\choose i}p^i(1-p)^{n-i}$$
So if you want to find the probability of at least x events you do
$$\texttt{atLeast}(x,n,p) = 1 - \texttt{cumBinomDist}(\texttt{ceil}(x) - 1,n,p) \\
 = 1 - \Pr(X \le \lceil x\rceil - 1) = 1 - \sum_{i=0}^{\lceil x\rceil - 1} {n\choose i}p^i(1-p)^{n-i} \\
 = \sum_{i=\lceil x \rceil}^{n} {n\choose i}p^i(1-p)^{n-i} = \Pr(X \ge x) \\
$$
A: Your approach is correct, but as David Mitra pointed out, you are undercounting the number of ways you can get $x$ events in $N$ trials. You need to multiply by $N \choose x$ then your approach will work. Its a discrete sum, so there is no shortcut as there would be with integrals.
