Tutorials › Introduction to Statistics › The Binomial Probability Mass Function

Binomial and Geometric Models · Tutorial 403 of 996

The Binomial Probability Mass Function

Learn how the binomial formula follows from independent trials, and how to identify its parameters, count range, and support.

Intermediate 9 min read

What You'll Learn

  • State the assumptions that define a binomial count.
  • Distinguish the number of trials from the probability of success on each trial.
  • Build the probability mass function from a single outcome sequence and the number of success arrangements.
  • Identify the binomial count range and support, including when the success probability is zero or one.
  • Evaluate a point probability using the binomial formula.
  • Recognize why counting arrangements and accounting for their probabilities are both necessary.

From Trial Outcomes to a Count Probability

Suppose a process is repeated a fixed number of times, and each repetition has one of two outcomes: a designated success or a failure. If we want the probability of exactly \(x\) successes, we need to account for two things: the probability of one particular order of successes and failures, and the number of different orders that contain \(x\) successes. The binomial probability mass function combines these two ingredients.

For example, “exactly three successes in six trials” includes many possible orders. One order is success, success, failure, success, failure, failure; another is failure, success, failure, success, success, failure. The probability of each order can be calculated from the trial model, while the number of such orders is counted using a binomial coefficient.

Definition: A binomial random variable \(X\) counts the number of successes in a fixed number \(n\) of trials, when each trial has two possible outcomes, the trials are independent, and the probability of success is the same value \(p\) on every trial. Here \(n\) is a positive integer and \(0\leq p\leq 1\). The possible count values lie in the nominal range \(0,1,\ldots,n\).

The phrase probability mass function (PMF) means a rule giving the probability assigned to each possible value of a discrete random variable. For a binomial count, the PMF gives \(P(X=x)\), the probability of exactly \(x\) successes. The number \(n\) and the probability \(p\) determine the model; \(x\) is the particular count whose probability is being evaluated.

Building the Binomial Formula

First consider one particular ordered sequence containing \(x\) successes and \(n-x\) failures. Since the trials are independent, the probability of the whole sequence is the product of the probabilities of its outcomes. Each success contributes a factor \(p\), and each failure contributes a factor \(1-p\). Therefore, the probability of this particular sequence is \(p^x(1-p)^{n-x}\).

That is the probability of one order, not yet the probability of getting exactly \(x\) successes in any order. The number of distinct orders with \(x\) successes among \(n\) positions is \(\binom{n}{x}\), the binomial coefficient. The events corresponding to the different orders are mutually exclusive: a trial sequence cannot be two different orders at once. Because each of these orders has the same probability under the equal-\(p\) assumption, adding their probabilities gives the PMF.

Theorem: If \(X\) is a binomial random variable with parameters \(n\) and \(p\), then for \(0<p<1\) and integer \(x\) with \(0\leq x\leq n\), $$ P(X=x)=\binom{n}{x}p^x(1-p)^{n-x}. $$ Here \(\binom{n}{x}=\dfrac{n!}{x!(n-x)!}\) counts the ways to choose which \(x\) of the \(n\) trial positions are successes. The parameters are \(n\), the fixed number of trials, and \(p\), the common probability of success on each trial.

The multiplication by \(\binom{n}{x}\) is essential because an exact count does not specify an order. The factor \(p^x(1-p)^{n-x}\) accounts for the probability of each order, and the coefficient counts how many mutually exclusive orders contribute to the event \(X=x\).

Worked Example: Exactly Four Successful Checks

In a hypothetical quality-control exercise, five independent checks are performed. Each check flags a condition with probability \(0.80\), independently of the others. Let \(X\) be the number of checks that flag the condition. Find the probability that exactly four checks flag it.

The model conditions are satisfied by the description: there are a fixed \(n=5\) checks, each has two outcomes (flag or do not flag), the probability of a flag is the same \(p=0.80\) for each check, and the checks are assumed independent. Thus \(X\) is binomial with \(n=5\) and \(p=0.80\). The target count \(x=4\) is in the range \(0,\ldots,5\).

There are \(\binom{5}{4}=5\) orders with four flags and one non-flag. Each such order has probability \((0.80)^4(0.20)^1\), so $$ P(X=4)=\binom{5}{4}(0.80)^4(0.20)^1 =5(0.4096)(0.20) =0.4096. $$

Under this model, the probability of exactly four flags is \(0.4096\), or \(40.96\%\). This result concerns exactly four flags, not four or more.

Parameters, Count Range, and Support

The parameter \(n\) sets the largest possible count and the number of trials. The parameter \(p\) specifies the success probability on each trial. These are model inputs, whereas \(X\) is the random count and \(x\) is a value at which the PMF is evaluated. Keeping these roles distinct helps prevent substituting the observed count for the number of trials.

The nominal count range is \(0,1,\ldots,n\): a sequence of \(n\) trials cannot contain fewer than zero successes or more than \(n\). For \(0<p<1\), every integer in this range has positive probability, so the support—the set of values that can occur with positive probability—is all of \(0,1,\ldots,n\). At the endpoints \(p=0\) and \(p=1\), some values in the nominal range have probability zero. In those cases the support is smaller.

Key distinction: The nominal count range is \(0,\ldots,n\), regardless of \(p\). The support contains only values with positive probability. If \(p=0\), every trial fails and the support is \(\{0\}\). If \(p=1\), every trial succeeds and the support is \(\{n\}\).

At \(p=0\), the PMF is \(P(X=0)=1\), with probability zero for all other counts. At \(p=1\), it is \(P(X=n)=1\), with probability zero for all other counts. These endpoint descriptions also avoid ambiguous expressions involving a zero raised to the zeroth power. The displayed product formula is used directly for \(0<p<1\); the endpoint cases are stated separately.

Worked Example: Identifying the Count and Its Support

Imagine a hypothetical set of four independent trials, where success means that a device gives an alert. On each trial, the probability of an alert is \(p=0.30\). Let \(X\) count the alerts. Identify the parameters and support, then find \(P(X=2)\).

There are a fixed four trials, the outcomes are alert or no alert, and the stipulated alert probability is the same on each independent trial. Thus \(n=4\), \(p=0.30\), and \(X\) is binomial. Because \(0<p<1\), the support is \(\{0,1,2,3,4\}\). The target value \(x=2\) is in the support.

The number of orders with two alerts is \(\binom{4}{2}=6\). Each such order has two alert probabilities and two no-alert probabilities: $$ P(X=2)=\binom{4}{2}(0.30)^2(0.70)^2 =6(0.09)(0.49) =0.2646. $$

The model assigns probability \(0.2646\) to exactly two alerts in these four trials. The parameter \(p=0.30\) describes one trial, not the probability of the count \(X\) equaling two.

Why the Formula Is a Probability Distribution

A PMF must assign probabilities that add to one across all values in the support. For \(0<p<1\), the binomial formula has this property. Summing over all possible counts and applying the binomial theorem gives $$ \sum_{x=0}^{n}P(X=x) =\sum_{x=0}^{n}\binom{n}{x}p^x(1-p)^{n-x} =\bigl(p+(1-p)\bigr)^n =1^n =1. $$

The binomial-theorem expansion enumerates the terms for all counts \(x=0,\ldots,n\). Each term corresponds to the probability contribution from the orders with that count. Since \(p+(1-p)=1\), the total probability across all counts is one, as required.

There is also a direct way to see why the counting argument works. Every complete sequence of \(n\) binary outcomes has exactly one success count. Sequences with different counts cannot overlap, and together they cover every possible sequence. Grouping the sequences according to their success count therefore partitions the full set of outcomes; adding the probability of each group gives the total probability of all outcomes.

Worked Example: Three Alerts in Six Trials

In a hypothetical monitoring system, six independent trials are run, and each has probability \(0.10\) of producing an alert. Let \(X\) be the number of alerts. Find the probability of exactly three alerts.

The trial count is fixed at \(n=6\); each trial has two outcomes, the alert probability is constant at \(p=0.10\), and independence is assumed. Hence \(X\) is binomial, and since \(0<0.10<1\), its support is \(\{0,1,2,3,4,5,6\}\). The count \(x=3\) is in the support.

There are \(\binom{6}{3}=20\) orders containing three alerts and three non-alerts. One such order has probability \((0.10)^3(0.90)^3\). Therefore, $$ P(X=3)=\binom{6}{3}(0.10)^3(0.90)^3 =20(0.001)(0.729) =0.01458. $$

The probability of exactly three alerts under this hypothetical model is \(0.01458\), or \(1.458\%\). The coefficient \(20\) matters even though the probability of any one specified order is only \(0.000729\).

Checking the Model Before Using the PMF

The formula is not a general rule for every count of successes. It applies when the trial structure fits the binomial model. In a real application, independence and a common success probability require justification from the design or a defensible model; merely having binary outcomes does not establish either condition.

1
Fix the trial count.
Confirm that the process has a predetermined number \(n\) of trials, rather than stopping according to the outcomes.
2
Define success consistently.
Each trial must be classified as success or failure using the same rule.
3
Check independence and \(p\).
Confirm that trial outcomes are independent and that each trial has the same success probability \(p\), as required by the model.
4
Check the requested count.
Ensure \(x\) is an integer from \(0\) through \(n\), and use the endpoint support description if \(p=0\) or \(p=1\).

For example, if successive trials affect one another, multiplying the same \(p\) once per success and \(1-p\) once per failure may not give the probability of a sequence. Likewise, if success probabilities differ from trial to trial, different orders with the same number of successes may have different probabilities. In either situation, the simple binomial PMF does not follow from the argument above.

Common Mistake: Counting Only One Order

A frequent error is to calculate \(p^x(1-p)^{n-x}\) and call it \(P(X=x)\). That product is the probability of one specified sequence with \(x\) successes, not of all sequences yielding exactly \(x\) successes. The correction is to multiply by \(\binom{n}{x}\), which counts the distinct orders. For instance, in the four-trial example, one particular order with two alerts has probability \((0.30)^2(0.70)^2=0.0441\); there are six such orders, giving \(6(0.0441)=0.2646\).

A related error is to reverse the exponents. The exponent on \(p\) is the number of successes, \(x\); the exponent on \(1-p\) is the number of failures, \(n-x\). Their sum is \(n\), accounting for all trials. Finally, do not call every value from \(0\) to \(n\) part of the support without checking \(p\): when \(p\) is zero or one, only one count value has positive probability.

Key takeaway: For a binomial count, the probability of exactly \(x\) successes is the probability of one order, \(p^x(1-p)^{n-x}\), multiplied by the number of orders, \(\binom{n}{x}\). The model has parameters \(n\) and \(p\); for \(0<p<1\) its support is \(0,\ldots,n\), while at the endpoints its support is \(\{0\}\) or \(\{n\}\).

Check Your Understanding

Use the model conditions and the distinction between count range and support when answering.

  1. A binomial model has \(n=7\) and \(p=0.25\). State its parameters and support.
  2. In words, explain why the factor \(\binom{n}{x}\) appears in the PMF.
  3. For \(n=5\) and \(p=0.60\), write the expression for the probability of exactly two successes. Do not evaluate it.
  4. For \(n=4\) and \(p=0\), state the nominal count range and the support. Which count has probability one?
  5. Why is \(p^x(1-p)^{n-x}\) alone generally not the probability of exactly \(x\) successes?