Originally Posted by

**awkward** The amount of computation can be reduced considerably with a little ingenuity.

Let H be the number of heads, which has a Binomial(n=30, p=.5) distribution. We want to find $\displaystyle \Pr(H \leq 16)$. By the symmetry of the Binomial distribution for p = .5, we know that

$\displaystyle \Pr(H \leq 14) = \Pr(H \geq 16)$.

Then since

$\displaystyle \Pr(H \leq 14) + \Pr(H = 15) + \Pr(H \geq 16) = 1$,

$\displaystyle 2 \Pr(H \leq 14) + \Pr(H = 15) = 1$.

So

$\displaystyle \Pr(H \leq 14) = (1/2) \; (1 - \Pr(H = 15))$.

And

$\displaystyle \Pr(H \leq 16) = \Pr(H \leq 14) + \Pr(H = 15) + \Pr(H = 16)$,

so

$\displaystyle \Pr(H \leq 16) = (1/2) \; (1 + \Pr(H =15)) + \Pr(H = 16)$

which requires only two evaluations of the Binomial pdf.

(Of course, if you have calculator which gives you the cumulative distribution automatically, you may not care.)