Probability · Repeated trials

Repeated Independent Trials: Binomial, Normal and Poisson

Flip a coin 100 times, throw a die until a six appears, inspect 1000 light bulbs for defects: the same experiment is repeated many times, independently, and we count how often an event \(A\) happens. One formula, Bernoulli's, answers every question exactly. But for large numbers of trials it becomes impractical, and two approximations take over: the normal curve (de Moivre–Laplace) when \(A\) is reasonably likely, and the Poisson law when \(A\) is rare. This post covers all three and explains when to use which.

1. Bernoulli's formula

Suppose an event \(A\) can occur in each of \(n\) independent repetitions of an experiment, with the same probability \(p\) each time, and let \(q = 1 - p\). If \(\mu\) is the number of times \(A\) actually occurred, the ratio \(\frac\mu n\) is the relative frequency of \(A\) in the series.

1° Binomial law The probability that \(A\) occurs exactly \(m\) times in \(n\) independent trials is \[ P_n(m) = \binom nm p^mq^{n-m}, \qquad m = 0, 1, \dots, n, \qquad \sum_{m=0}^nP_n(m) = 1. \] The sequence \(P_n(m)\) is the binomial distribution.

Why: a particular sequence with \(m\) successes and \(n - m\) failures, say \(AA\bar A A\bar A\cdots\), has probability \(p^mq^{n-m}\) by independence. The number of such sequences is the number of ways to choose which \(m\) of the \(n\) positions are successes, \(\binom nm\) (the book writes \(C_n^m\)). The probabilities add up to \( (p + q)^n = 1 \) by the binomial theorem, which is where the name comes from.

Example 1 A die is thrown 10 times. The probability of exactly two sixes: \[ P_{10}(2) = \binom{10}{2}\Big(\frac16\Big)^2\Big(\frac56\Big)^8 = 45\cdot\frac1{36}\cdot0.2326 \approx 0.2907. \]

2. How many trials are needed?

"At least once" is the complement of "never", and the probability of "never" is \(q^n\). So \(A\) occurs at least once with probability \( 1 - (1 - p)^n \). Requiring this to be at least \(P\) and solving for \(n\) (dividing by \(\log(1 - p) < 0\) flips the inequality):

Number of trials To be able to assert with probability at least \(P\) that \(A\) occurs at least once, the number of trials must satisfy \[ n \ge \frac{\log(1 - P)}{\log(1 - p)}, \] where \(p\) is the probability of \(A\) in each trial.
Example 2 How many times must a die be thrown to get at least one six with probability \(0.9\)? \( n \ge \frac{\log0.1}{\log\frac56} \approx 12.63 \), so \(n = 13\). (The Chevalier de Méré noticed that "at least one six in 4 throws" is a good bet: \( 1 - (\frac56)^4 \approx 0.518 \).)

3. The most probable number of occurrences

Compare consecutive probabilities:

\[ \frac{P_n(m + 1)}{P_n(m)} = \frac{n - m}{m + 1}\cdot\frac pq. \]

This ratio is \(> 1\) (probabilities increasing) while \( m < np - q \), and \(< 1\) once \( m > np - q \). So the distribution rises to a peak and falls, and the peak is at

Most probable number \(m_0\)
  • If \(np - q\) is an integer, \(P_n(m)\) has two equal largest values, at \( m_0 = np - q \) and \( m_0 + 1 = (n + 1)p \).
  • If \(np - q\) is not an integer, the largest value is at \( m_0 = [(n + 1)p] \) (the integer part).
In both cases \( np - q \le m_0 \le np + p \): the most probable number is within \(1\) of \(np\).
Example 3 Ten throws of a die: \( np - q = \frac{10}{6} - \frac56 = \frac56 \), not an integer, so \( m_0 = [\frac{11}{6}] = 1 \). Indeed \( P_{10}(1) \approx 0.3230 > P_{10}(2) \approx 0.2907 \).
Five tosses of a coin: \( np - q = 2.5 - 0.5 = 2 \), an integer, so \(m = 2\) and \(m = 3\) are equally most probable: \( P_5(2) = P_5(3) = \frac{10}{32} = 0.3125 \).

4. Generating functions and unequal probabilities

The binomial probabilities are the coefficients of \( (q + px)^n = \sum_mP_n(m)x^m \). The same idea works when the trials are independent but have different probabilities \(p_1, p_2, \dots, p_n\) of success:

Generating function The probability \(P_n(m)\) of exactly \(m\) successes is the coefficient of \(x^m\) in the expansion of \[ \varphi_n(x) = \prod_{i=1}^n(q_i + p_ix), \qquad q_i = 1 - p_i. \]

Why: expanding the product, each term picks from every factor either \(q_i\) (trial \(i\) fails) or \(p_ix\) (trial \(i\) succeeds, contributing one power of \(x\)). The power of \(x\) counts the successes, and the coefficient is the probability of that particular pattern. Collecting equal powers adds up all patterns with \(m\) successes. For equal \(p_i = p\) this is \((q + px)^n\) again.

Example 4 · Three shooters Three shooters hit a target with probabilities \(0.6\), \(0.7\), \(0.8\). Then \[ (0.4 + 0.6x)(0.3 + 0.7x)(0.2 + 0.8x) = 0.024 + 0.188x + 0.452x^2 + 0.336x^3. \] So the target is hit exactly twice with probability \(0.452\), by all three with \(0.336\), and not at all with \(0.024\). (The coefficients add up to \(1\): put \(x = 1\).)

5. More than two outcomes: the multinomial law

Suppose each trial has \(k\) mutually exclusive outcomes \(A_1, \dots, A_k\) forming a complete group, with \( P(A_i) = p_i \), \( \sum p_i = 1 \).

Multinomial distribution The probability that, in \(n\) independent trials, \(A_1, \dots, A_k\) occur \(m_1, \dots, m_k\) times respectively (\( m_1 + \cdots + m_k = n \)) is \[ P_n(m_1, m_2, \dots, m_k) = \frac{n!}{m_1!\,m_2!\cdots m_k!}\,p_1^{m_1}p_2^{m_2}\cdots p_k^{m_k}. \] It is the coefficient of \( x_1^{m_1}\cdots x_k^{m_k} \) in the generating function \( \varphi_n(x_1, \dots, x_k) = (p_1x_1 + \cdots + p_kx_k)^n \).

The reasoning is the same as for the binomial law; \( \frac{n!}{m_1!\cdots m_k!} \) is the number of ways to arrange the outcomes (a multinomial coefficient). For \(k = 2\) it is the binomial formula.

Example 5 A die is thrown 6 times. The probability that each face appears exactly once: \( \frac{6!}{1!\cdots1!}\big(\frac16\big)^6 = \frac{720}{46656} \approx 0.0154 \). Surprisingly small: only about 1.5%.

6. The local de Moivre–Laplace theorem

For large \(n\), the binomial coefficients become huge and the powers tiny, and computing \(P_n(m)\) directly is hard. But the shape of the distribution becomes simple: a bell curve centred at \(np\) with width \(\sqrt{npq}\).

2° Local de Moivre–Laplace theorem For \(n\) independent trials with \( 0 < p < 1 \), \( q = 1 - p \), let \[ x = \frac{m - np}{\sqrt{npq}}. \] If \(x\) stays bounded as \(n \to \infty\) and \(m \to \infty\), then \[ P_n(m) \sim \frac{1}{\sqrt{2\pi npq}}\,e^{-x^2/2} = \frac{1}{\sqrt{npq}}\,\varphi(x), \qquad \varphi(x) = \frac{1}{\sqrt{2\pi}}e^{-x^2/2}, \] where \(\sim\) means that the ratio of the two sides tends to \(1\) as \(n \to \infty\).

Why the bell curve: \(np\) is the expected number of successes and \(\sqrt{npq}\) is the standard deviation, so \(x\) measures "how many standard deviations \(m\) is from the mean". Applying Stirling's formula \( k! \approx \sqrt{2\pi k}\,(k/e)^k \) to the three factorials in \(\binom nm\), and expanding the logarithm to second order in \(x\), gives exactly \( \frac{1}{\sqrt{2\pi npq}}e^{-x^2/2} \). The factor \(\frac{1}{\sqrt{npq}}\) converts the density \(\varphi(x)\) into the probability of one integer value of \(m\) (one step in \(m\) is a step of \(\frac{1}{\sqrt{npq}}\) in \(x\)).

0 5 10 15 20 25 30 0.15 0.1 0.05 normal approximation m
Figure 1. The binomial distribution for \(n = 30\), \(p = 0.3\) (bars) and the de Moivre–Laplace approximation \( \frac{1}{\sqrt{npq}}\varphi\big(\frac{m - np}{\sqrt{npq}}\big) \) (curve). Even for this moderate \(n\) the agreement is close; the peak is at \(m_0 = [(n + 1)p] = 9\).
Example 6 \(n = 400\), \(p = 0.2\): \(np = 80\), \( \sqrt{npq} = 8 \). For \(m = 80\), \(x = 0\): \[ P_{400}(80) \approx \frac{1}{8\sqrt{2\pi}} \approx 0.04987, \] while the exact value is \(0.04981\).

7. The integral de Moivre–Laplace theorem

Usually we need the probability of a range of values, e.g. "between 70 and 90 successes". Adding up the local approximations turns a sum into an integral:

3° Integral de Moivre–Laplace theorem \[ P\Big\{a \le \frac{m - np}{\sqrt{npq}} < b\Big\} \longrightarrow \frac{1}{\sqrt{2\pi}}\int_a^be^{-x^2/2}\,dx \qquad (n \to \infty), \] uniformly with respect to \(a\) and \(b\) (\( -\infty \le a < b \le \infty \)).

In practice, with \( \Phi(z) = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^ze^{-x^2/2}dx \) (tabulated), \( P(m_1 \le m \le m_2) \approx \Phi(x_2) - \Phi(x_1) \). This is the first version of the central limit theorem: the number of successes is approximately normally distributed.

Example 7 · With and without continuity correction \(n = 400\), \(p = 0.2\): \( P(70 \le m \le 90) \)?
  • Directly: \( x_{1,2} = \frac{70 - 80}{8}, \frac{90 - 80}{8} = \mp1.25 \): \( \Phi(1.25) - \Phi(-1.25) \approx 0.7887 \).
  • With the continuity correction (each integer \(m\) represents the interval \([m - \frac12, m + \frac12]\)): \( x = \frac{69.5 - 80}{8}, \frac{90.5 - 80}{8} = \mp1.3125 \): \( \approx 0.8106 \).
  • Exact (summing the binomial probabilities): \(0.8109\).
The correction matters for moderate \(n\); the theorem itself guarantees only the limit.

8. Poisson's theorem: rare events

The normal approximation needs \(npq\) to be large. If \(p\) is very small (defective items, misprints, radioactive decays per second) while \(np\) stays moderate, a different limit appears.

4° Poisson's theorem Let \( 0 < a < b < \infty \) and \( a_n = np \). If \(p \to 0\) as \(n \to \infty\) with \( a < a_n < b \), then \[ P_n(m) \sim \frac{a_n^m}{m!}e^{-a_n}. \] In particular, if \( a_n \to a \) (\( 0 < a < \infty \)), then \( P_n(m) \to \frac{a^m}{m!}e^{-a} \).

Why: with \( p = \frac an \),

\[ P_n(m) = \frac{n(n - 1)\cdots(n - m + 1)}{m!}\,\frac{a^m}{n^m}\Big(1 - \frac an\Big)^{n-m} = \frac{a^m}{m!}\cdot\underbrace{\frac{n(n - 1)\cdots(n - m + 1)}{n^m}}_{\to1}\cdot\underbrace{\Big(1 - \frac an\Big)^n}_{\to e^{-a}}\cdot\underbrace{\Big(1 - \frac an\Big)^{-m}}_{\to1}. \]
Poisson distribution The numbers \[ p(m) = \frac{a^m}{m!}e^{-a}, \qquad m = 0, 1, 2, \dots, \qquad \sum_{m=0}^\infty p(m) = 1, \] form the Poisson distribution with parameter \(a\) (its mean, and also its variance).

(The sum is \( e^{-a}\sum\frac{a^m}{m!} = e^{-a}e^a = 1 \). The book uses both \(P(m)\) and \(p(m)\) for the same numbers.)

Example 8 A factory produces items with defect probability \(0.002\). In a batch of \(1000\), the probability of exactly 3 defective items: \(a = np = 2\), \[ P \approx \frac{2^3}{3!}e^{-2} \approx 0.1804; \] the exact binomial value is \(0.1806\).

9. Summary: which formula when?

SituationFormula
small \(n\), exact\( P_n(m) = \binom nmp^mq^{n-m} \)
at least once\( 1 - q^n \); \( n \ge \frac{\log(1 - P)}{\log(1 - p)} \)
most probable \(m\)\( np - q \le m_0 \le np + p \)
different \(p_i\)coefficients of \( \prod(q_i + p_ix) \)
\(k\) outcomes\( \frac{n!}{m_1!\cdots m_k!}p_1^{m_1}\cdots p_k^{m_k} \)
large \(n\), \(npq\) large, one value\( P_n(m) \approx \frac{1}{\sqrt{npq}}\varphi(x) \)
large \(n\), \(npq\) large, a range\( \Phi(x_2) - \Phi(x_1) \) (+ continuity correction)
large \(n\), small \(p\), \(np\) moderate\( P_n(m) \approx \frac{a^m}{m!}e^{-a} \), \(a = np\)

10. Practice problems

Try each one before opening the solution. More solved problems from this topic are in Probability.

Problem 1: A coin is tossed 8 times. Find the probability of exactly 4 heads, and of at least one head.

\( \binom84/2^8 = \frac{70}{256} \approx 0.273 \); \( 1 - \frac{1}{256} \approx 0.996 \).

Problem 2: Find the most probable number of hits in 20 shots with hit probability \(0.7\).

\( np - q = 14 - 0.3 = 13.7 \), not an integer: \( m_0 = [21\cdot0.7] = [14.7] = 14 \).

Problem 3: How many lottery tickets with winning probability \(0.05\) must one buy to win at least once with probability \(0.95\)?

\( n \ge \frac{\log0.05}{\log0.95} \approx 58.4 \): 59 tickets.

Problem 4: Two independent devices fail with probabilities \(0.1\) and \(0.2\). Find the distribution of the number of failures.

\( (0.9 + 0.1x)(0.8 + 0.2x) = 0.72 + 0.26x + 0.02x^2 \).

Problem 5: A coin is tossed 10 000 times. Estimate the probability that the number of heads is between 4950 and 5050.

\( np = 5000 \), \( \sqrt{npq} = 50 \), \( x = \pm1 \): \( \Phi(1) - \Phi(-1) \approx 0.683 \) (about \(0.69\) with continuity correction, \(x = \pm1.01\)).

Problem 6: A book of 500 pages has 250 misprints. Estimate the probability that a given page has no misprint.

\( a = \frac{250}{500} = 0.5 \): \( p(0) = e^{-0.5} \approx 0.607 \).

Final thoughts

Bernoulli's formula \( \binom nmp^mq^{n-m} \) is the exact answer for repeated independent trials, and its generating function \((q + px)^n\) extends it to unequal probabilities and, as \((p_1x_1 + \cdots + p_kx_k)^n\), to several outcomes. For many trials the binomial distribution takes one of two limiting shapes. When \(npq\) is large it approaches the normal curve (de Moivre–Laplace), the first appearance of the central limit theorem. When \(p\) is tiny and \(np\) moderate it approaches the Poisson law of rare events. Choosing the right one is half of the skill.

Related posts: the Gamma function and Stirling's formula, Hermite polynomials (orthogonal with respect to the Gaussian weight), and Bernoulli polynomials (generating functions).