Tutorials › AP Statistics › Using binompdf for Exact Probabilities

Binomial distributions · Tutorial 347 of 1000

Using binompdf for Exact Probabilities

Use binompdf to calculate an exact binomial probability, then check the result by substituting into the binomial formula.

Intermediate 9 min read

What You'll Learn

  • Identify n, p, and k before entering a binomial probability command.
  • Use binompdf(n,p,k) to find the probability of exactly k successes.
  • Verify calculator results with the binomial probability formula.
  • Check that k is a whole number from 0 through n and that p is entered as a probability.
  • Recognize how the formula works when k is 0 or k equals n.

From the Binomial Formula to binompdf

In The Binomial Probability Formula and Understanding Combinations in the Binomial Formula, you learned how to calculate the probability of exactly \(k\) successes by counting the success-position arrangements and multiplying by the probability of each arrangement. A calculator can evaluate that same probability directly with the binomial probability function, commonly written as binompdf.

The “exactly” matters: binompdf returns the probability that the random variable \(X\) equals one specified value \(k\). It does not add probabilities for several possible counts. For example, if \(X\) counts the number of seedlings that sprout, binompdf can find the probability that exactly three sprout. The inputs tell the calculator the number of trials, the probability of success on each trial, and the exact count requested.

Definition: For a binomial random variable \(X\), \(\operatorname{binompdf}(n,p,k)\) gives \(P(X=k)\), where \(n\) is the fixed number of trials, \(p\) is the probability of success on each trial, and \(k\) is the exact number of successes.

The command name is short for “binomial probability density function.” Although “density” appears in the name, a binomial distribution is discrete: the result is the probability of one exact count, not a height on a continuous curve. On a TI-84-style calculator, the command is generally available through the distribution menu. Menu paths can vary by model, so check the calculator’s menu if needed. The input order is \(n\), then \(p\), then \(k\).

$$ \operatorname{binompdf}(n,p,k)=P(X=k) =\binom{n}{k}p^k(1-p)^{n-k} $$

This equality is the main check: the calculator command and the binomial formula calculate the same probability. In the formula, \(\binom{n}{k}\) counts the ways to choose which \(k\) trial positions are successes, while \(p^k(1-p)^{n-k}\) is the probability of any one such arrangement. As in the earlier tutorial on combinations, \(n\) is the total number of trial positions and \(k\) is the number selected as successes.

Set Up the Inputs Before Calculating

Before using binompdf, translate the context into \(n\), \(p\), and \(k\). As in Defining n, p, and X in Context, define what one trial is, what counts as success, and what the random variable counts. Then match each value to its place in the command. This small setup step helps prevent entering a failure probability in place of \(p\), or asking for a different number of successes than the problem specifies.

Input check: Use a whole-number trial count \(n\), a success probability \(p\) from 0 to 1, and a whole-number exact count \(k\) from 0 through \(n\). Enter the inputs in that order: \(\operatorname{binompdf}(n,p,k)\).

A binomial probability requires a binomial setting. Use the BINS checklist from the earlier tutorials: Binary outcomes, Independent trials, a fixed Number of trials, and the Same probability of success on each trial. binompdf performs the calculation for the model you supply; it cannot establish that the model is appropriate. If the situation does not support a binomial model, a calculator result does not make the model valid.

When you check with the formula, write the values into the formula before calculating. In particular, the exponent on \(p\) is \(k\), and the exponent on \(1-p\) is \(n-k\). These exponents account for the numbers of successes and failures in an arrangement with exactly \(k\) successes.

Worked Example: Exactly Two Seedlings Sprout

Worked Example: Exactly Two Seedlings Sprout

A classroom demonstration uses a model in which each seed has a 0.25 probability of sprouting, independently of the other seeds. Eight seeds are planted. Let \(X\) be the number that sprout. Find the probability that exactly two sprout.

Identify. A trial is observing whether one seed sprouts, and a sprouting seed is a success. The model gives two outcomes per trial, independence, a fixed eight seeds, and the same success probability \(p=0.25\). Thus \(n=8\), \(p=0.25\), and the exact count is \(k=2\).

Calculate with binompdf. Enter the values in the order \(n,p,k\):

$$ \operatorname{binompdf}(8,0.25,2)\approx 0.3115 $$

Check with the formula. There are \(8-2=6\) failures, and the combination is \(\binom{8}{2}=28\):

$$ \begin{aligned} P(X=2) &=\binom{8}{2}(0.25)^2(1-0.25)^{8-2}\\ &=28(0.25)^2(0.75)^6\\ &=28(0.0625)(0.177978515625)\\ &=28(0.0111236572265625)\\ &=0.31146240234375\\ &\approx 0.3115. \end{aligned} $$

Answer in context. According to this model, the probability that exactly two of the eight seeds sprout is about \(0.3115\), or 31.15%. The calculator result agrees with the formula, rounded to four decimal places.

The check is useful even when the calculator is available. It confirms not only the arithmetic but also the setup: there are eight trials, two successes, and six failures. If you had entered \(k=6\), you would have asked for exactly six successes instead.

Worked Example: Five Successful Device Checks

Worked Example: Five Successful Device Checks

A technician models each device check as an independent trial with probability 0.40 of detecting a fault. Twelve devices are checked. Let \(X\) be the number of checks that detect a fault. Find \(P(X=5)\).

Identify. The success is detecting a fault on one check. The model has two outcomes for each check, independent trials, a fixed \(n=12\), and the same \(p=0.40\). The requested exact count is \(k=5\).

Calculate with binompdf.

$$ \operatorname{binompdf}(12,0.40,5)\approx 0.2270 $$

Check with the formula. There are \(12-5=7\) checks that do not detect a fault. Also, \(\binom{12}{5}=792\):

$$ \begin{aligned} P(X=5) &=\binom{12}{5}(0.40)^5(1-0.40)^{12-5}\\ &=792(0.40)^5(0.60)^7\\ &=792(0.01024)(0.0279936)\\ &=792(0.000286654464)\\ &=0.227030335488\\ &\approx 0.2270. \end{aligned} $$

Answer in context. Under this model, the probability that exactly five of the twelve checks detect a fault is about \(0.2270\), or 22.70%. Both methods give the same probability when rounded to four decimal places.

This example also shows why the probability input is \(0.40\), not \(0.60\). Success was defined as detecting a fault, and the model assigns that outcome probability \(0.40\). The \(0.60\) probability of not detecting a fault appears in the formula as \(1-p\), raised to the number of failures.

Worked Example: Exactly Zero Successes

Worked Example: Exactly Zero Successes

A community group models each of seven independent online invitations as having a 0.15 probability of receiving a response. Let \(X\) be the number of invitations that receive a response. Find the probability that none receive a response.

Identify. A response is a success, so \(n=7\), \(p=0.15\), and “none” means \(k=0\). The model has binary outcomes, independent trials, a fixed number of invitations, and a constant success probability.

Calculate with binompdf.

$$ \operatorname{binompdf}(7,0.15,0)\approx 0.3206 $$

Check with the formula. Since \(k=0\), the success factor is \(p^0=1\), and all seven trials are failures:

$$ \begin{aligned} P(X=0) &=\binom{7}{0}(0.15)^0(1-0.15)^{7-0}\\ &=1(1)(0.85)^7\\ &=0.32057708828125\\ &\approx 0.3206. \end{aligned} $$

Answer in context. The model gives a probability of about \(0.3206\), or 32.06%, that none of the seven invitations receives a response. The formula and calculator agree to four decimal places.

The edge case \(k=0\) follows the same formula as every other exact count. The combination \(\binom{7}{0}=1\) means there is one way for zero trial positions to be successes: every position is a failure. Similarly, if the requested count were \(k=n\), there would be one way for every trial to be a success, and the probability would be \(p^n\).

Common Mistakes and AP Exam Tip

A calculator can return a plausible decimal even when the wrong inputs were entered. Make the meaning of each input visible in your work so that the result can be checked.

  • Using the wrong input order. The first input is \(n\), the second is \(p\), and the third is \(k\). State those values before showing the command.
  • Entering a percentage instead of a probability. A 40% probability is entered as \(0.40\), not \(40\).
  • Using the failure probability for \(p\). Define success first. In the fault-detection example, \(p=0.40\) because detection is success; \(0.60\) is the failure probability \(1-p\).
  • Confusing “exactly” with a range. \(\operatorname{binompdf}(n,p,k)\) gives \(P(X=k)\) for one exact count. It does not by itself add probabilities for multiple counts.
  • Using an invalid count. The value \(k\) must be a whole number from 0 through \(n\). A request for exactly 9 successes in 8 trials cannot occur.
  • Showing only the calculator output. A decimal alone may not communicate what event was calculated. Include the definition of \(X\), the inputs, the command, and an interpretation in context.

For a full-credit written response, identify \(n\), \(p\), and \(k\), show the binompdf command, and state what its result means in context. When a check is requested, substitute the same values in the formula, including the correct number of failures \(n-k\), and show that the results agree after rounding.

Key Takeaway

binompdf is a direct calculator method for finding an exact binomial probability. It uses the same model and formula as the hand calculation: \(n\) fixed trials, success probability \(p\), and exactly \(k\) successes. A careful setup followed by a formula check can catch input and interpretation errors.

Key takeaway: To find the probability of exactly \(k\) successes, enter \(\operatorname{binompdf}(n,p,k)\). Check the result with \(\binom{n}{k}p^k(1-p)^{n-k}\), and interpret the probability in the context of the random variable \(X\).

Check Your Understanding

For each question, identify the requested exact count and explain how the calculator command matches the event.

  1. A model has \(n=9\) trials and \(p=0.20\). What command would find the probability of exactly three successes?
  2. For \(n=6\), \(p=0.35\), and \(k=2\), how many failures are included in the binomial formula?
  3. A calculator gives \(\operatorname{binompdf}(10,0.15,0)\approx 0.1969\). What event does this probability describe?
  4. In a model with \(n=8\) and \(p=0.60\), what does the command \(\operatorname{binompdf}(8,0.40,5)\) calculate if success is defined as the outcome with probability 0.40?
  5. Why does \(\operatorname{binompdf}(7,0.25,8)\) not describe a possible event?
  6. Write the binomial formula corresponding to \(\operatorname{binompdf}(9,0.30,4)\), leaving the combination unevaluated.