Biostatistics · Intermediate

Binomial trials

Written by SignalsLab

Early edition: these lessons are being reviewed.

Content

Summary

The binomial distribution models the count of successes in n independent Bernoulli trials with constant probability p. It is defined by the probability mass function Pr(X=k) = (n choose k) p^k q^(n-k), where q = 1-p. Key properties include a mean of np, variance of npq, and symmetry when p=0.5.

Intuition

Think of a binomial experiment as a sequence of yes/no decisions, like checking if cells are neutrophils. Each trial is independent, meaning one outcome doesn't affect the next. The 'success' label is neutral; it just marks the event we are counting, which could be a disease or a default. The total count of successes follows a specific pattern determined by how many ways you can arrange those successes among the trials, captured by the binomial coefficient.

Key equations

X=∑i=1nXi
(1)

The binomial random variable X is the sum of n independent Bernoulli trials.

Pr(X=k)=(nk)pkqn−k
(2)

The probability mass function for exactly k successes in n trials.

(nk)=n!k!(n−k)!
(3)

The binomial coefficient counting distinct arrangements of k successes.

μ=np
(4)

The expected number of successes (mean).

σ2=npq
(5)

The variance of the distribution.

Derivation

  1. Define a single Bernoulli trial with success probability p and failure probability q = 1-p.
  2. Consider n independent trials, where independence ensures probabilities multiply.
  3. A specific sequence of k successes and n-k failures has probability p^k q^(n-k).
  4. Since order does not matter for the total count, multiply by the number of such sequences.
  5. The number of sequences is given by the binomial coefficient n choose k.
  6. Summing these probabilities yields the PMF for the total count X.

Worked example

Problem

Calculate the probability that exactly 2 out of 5 cells are neutrophils, given p=0.6.

  1. Identify n=5, k=2, p=0.6, and q=0.4.
  2. Calculate the binomial coefficient: 5! / (2! * 3!) = 10.
  3. Calculate the probability of one specific sequence: 0.6^2 * 0.4^3 = 0.02304.
  4. Multiply the coefficient by the sequence probability: 10 * 0.02304 = 0.2304.

Answer 0.2304

Common mistakes

  • Interpreting 'success' as a desirable outcome rather than the event of interest.
  • Assuming independence when sampling without replacement from a small population.
  • Confusing the probability of exactly k successes with cumulative probabilities like P(X >= k).
  • Forgetting to use the complement rule for tail probabilities.

Animation

Animation coming soon

The animated version of this lesson is being prepared for the web. In the Signals AI app, lessons are drawn step by step.

Code

This is a text lesson: it has no animation code yet.

ccBYNC© 2026 SignalsLab. Lesson text shared as is under CC BY-NC 4.0.