What is the chance of getting exactly three heads in five coin tosses? For a fair coin and independent tosses, it is 10/32, or 31.25%. A random variable with a binomial distribution counts the heads; its binomial probability mass function assigns a probability to each possible count. The method applies whenever a fixed number of independent trials have the same probability of a chosen outcome.
The trials and the count
A binomial random variable counts how many times a defined outcome occurs in a fixed number of trials. Call that outcome a success and the other outcome a failure. These labels describe the counting rule: a defective item can be called a success if defects are what the study counts.
Four conditions define the standard model:
- The number of trials, n, is fixed in advance.
- Each trial is classified into two outcomes, success or failure.
- The probability of success, p, is the same on each trial.
- Trials are independent: knowing one outcome does not change the probabilities of the others.
Let X be the count of successes. Its possible values are 0, 1, 2, and so on through n. The notation X ~ Binomial(n, p) specifies both the number of trials and the probability for each. OpenStax describes these conditions and the corresponding probability formula.
For example, a die roll has six possible faces, but a study can classify each roll as “six” or “not six.” For independent rolls of a fair die, the success probability is 1/6 each time. The count of sixes in a fixed number of rolls is a binomially distributed random variable. The particular face chosen as success determines what the count means.
Binomial PMF: The formula for an exact count
A probability mass function, or PMF, gives the probability of each possible value of a discrete random variable. The binomial pmf is written:
P(X = k) = C(n, k) × pᵏ × (1 − p)⁽ⁿ⁻ᵏ⁾
Here k is the number of successes, from 0 through n. The term pᵏ accounts for the successes, and (1 − p)⁽ⁿ⁻ᵏ⁾ accounts for the failures. The factor C(n, k), read “n choose k,” counts the arrangements of k successes among n trials. It equals n! / [k!(n − k)!], with 0! = 1.
The binomial probability function includes that combination factor because the same count can occur in different orders. Three heads followed by two tails is one sequence; two tails followed by three heads is another. Both contribute to the probability of exactly three heads.
A calculator with a binomial dist function may ask for n, p, and k. Its result must still be read carefully: a mass function for the binomial gives the probability of exactly k, while a cumulative result includes a range of counts.
Work through five coin tosses
Suppose a fair coin is tossed five independent times. Define success as a head. Then n = 5, p = 0.5, and the question “exactly three heads” sets k = 3.
The binomial experiment formula gives:
P(X = 3) = C(5, 3) × (0.5)³ × (0.5)² = 10 × 1/32 = 10/32 = 0.3125.
There are ten ways to place three heads among five tosses. Each particular sequence has probability 1/32, because each toss has probability 1/2 and the tosses are independent. Adding the ten equally likely sequences gives 31.25%. The calculation does not say that three heads must appear once in every three sets of tosses; it gives the probability for one set under the stated model.
To ask for at most three heads is a different question. Add the probabilities for zero, one, two, and three heads: (1 + 5 + 10 + 10)/32 = 26/32, or 81.25%. “At least three” instead includes three, four, and five: (10 + 5 + 1)/32 = 16/32, or 50%.
Exact counts, cumulative totals, and averages
The binomial distribution function usually means the cumulative distribution function, written F(k) = P(X ≤ k). It adds the probabilities of all counts up to and including k. In the coin example, F(3) = 26/32. By contrast, the probability mass function of the binomial model at three is 10/32. Checking whether an answer includes the endpoint prevents a common error when using a calculator.
The mean count in this model is np. For five fair tosses it is 2.5 heads. This is an average over many repetitions, not a possible result of a single five-toss set. The variance is np(1 − p) and the standard deviation is its square root. Here the variance is 1.25 and the standard deviation is about 1.12 heads. These binomial statistics describe the distribution of counts, not the outcome of a particular set.
A probability distribution for a binomial count also allows a check: the probabilities for every count from zero through n must add to one. A computed negative probability or a total above one signals an error in the inputs or calculation.
When the assumptions fail
Suppose five cards are drawn from a deck without replacement and success means drawing an ace. The chance of an ace on a later draw depends on what was drawn earlier: the composition of the remaining deck changes. The trials are dependent, and their success probabilities are not constant. A hypergeometric model is appropriate for the number of aces in a fixed sample drawn this way.
Similarly, repeated answers from members of the same household may be related. Shared circumstances can make one response informative about another. Even if every person has the same individual chance of saying yes, dependence alone can invalidate the standard calculation. Binomial data require a defensible model of how the observations were produced, not just a column of yes-or-no responses.
Finally, if a process stops at the first success, the number of trials is not fixed beforehand. A model for the waiting time, such as the geometric distribution under independent trials with constant p, answers that different question. The binomial model instead starts with a fixed number of opportunities and counts successes within them.
