Example 7.2.3. Flipping a coin a fixed number of times.

Let’s consider a simple example for flipping coins. Indeed, suppose you flip a coin exactly 20 times and need to determine the probability of getting exactly 10 heads.
This is binomial with n = 20, p = 1/2 and you are looking for f(10). With these values
\begin{equation*} f(10) = \binom{20}{10} \cdot \left ( \frac{1}{2} \right )^{10} \cdot \left ( \frac{1}{2} \right )^{20-10} = \frac{46189}{262144} \approx 0.176 \end{equation*}
Note that the mean for this distribution is also 10 so one might expect 10 heads in general
If you rather would prefer to determine the probability of getting 10 or fewer heads requires F(10) = f(0) + f(1) + ... + f(10). There is no "nice" formula for F but this calculation can be performed using a graphing calculator, such as the TI-84 with F(x) = binomcdf(n,p,x). In this case, F(10) = binomcdf(20,1/2,10) = 0.588.
in-context