Math Core

Lesson 4.8 · Probability, Random Variables and Distributions

The binomial distribution

Many random processes boil down to counting successes in a fixed number of tries: how many of 10 free throws go in, how many of 50 surveyed voters support a measure, how many of 20 parts are defective. When the tries are independent and the success probability stays the same, the count has a binomial distribution, one of the most important models in statistics.

The binomial setting

Definition

Binomial setting

A binomial setting arises when you perform nn trials and all four of these conditions hold (remember them as BINS):

  • Binary: each trial has two outcomes, "success" or "failure".
  • Independent: the result of one trial doesn't affect any other.
  • Number: the number of trials nn is fixed in advance.
  • Same probability: each trial has the same probability of success pp.

The count XX of successes is a binomial random variable with parameters nn and pp.

"Success" is just the outcome you are counting. It doesn't have to be good; a defective part can be a success.

Sampling without replacement and the 10% condition

When you sample people without replacement, the trials aren't exactly independent: removing one person changes the proportions slightly for the next pick. But if the sample is small relative to the population, the change is negligible. The 10% condition says you may treat the trials as independent if n≤0.10Nn \le 0.10N, where NN is the population size.

The binomial probability formula

How likely is exactly kk successes? Any one particular arrangement of kk successes and n−kn - k failures has probability pk(1−p)n−kp^k (1-p)^{n-k}, by the multiplication rule for independent trials. The number of different arrangements is (nk)\binom{n}{k}, read "nn choose kk".

Binomial probability

If XX is binomial with nn trials and success probability pp, then for k=0,1,…,nk = 0, 1, \dots, n,

P(X=k)=(nk)pk(1−p)n−k,(nk)=n!k! (n−k)!.P(X = k) = \binom{n}{k} p^k (1 - p)^{n-k}, \qquad \binom{n}{k} = \dfrac{n!}{k!\,(n-k)!}.

On a TI-84, P(X=k)P(X = k) is binompdf(n, p, k) and P(X≤k)P(X \le k) is binomcdf(n, p, k). On the AP exam, name the distribution and its parameters, for example "XX is binomial with n=10n = 10, p=0.2p = 0.2", and show the formula or the calculator command with labeled inputs.

Worked example: Exactly three

A quiz has 10 multiple-choice questions, each with 5 choices. A student guesses randomly on every question. Find the probability of exactly 3 correct answers.

Solution. Check BINS: each question is right or wrong, guesses are independent, n=10n = 10 is fixed and p=15=0.2p = \dfrac{1}{5} = 0.2 every time. So XX is binomial with n=10n = 10, p=0.2p = 0.2.

P(X=3)=(103)(0.2)3(0.8)7=120(0.008)(0.2097152)≈0.2013.P(X = 3) = \binom{10}{3}(0.2)^3(0.8)^7 = 120(0.008)(0.2097152) \approx 0.2013.

Cumulative probabilities

For "at most", "at least" and "between", add individual probabilities or use the complement.

Worked example: At least two

For the guessing student, find P(X≥2)P(X \ge 2).

Solution. It's quicker to subtract the two excluded values from 1:

P(X≥2)=1−P(X=0)−P(X=1)=1−(0.8)10−(101)(0.2)(0.8)9=1−0.1074−0.2684≈0.6242.\begin{aligned} P(X \ge 2) &= 1 - P(X = 0) - P(X = 1) \\ &= 1 - (0.8)^{10} - \binom{10}{1}(0.2)(0.8)^9 \\ &= 1 - 0.1074 - 0.2684 \\ &\approx 0.6242. \end{aligned}

With a calculator: 1−binomcdf(10,0.2,1)≈0.62421 - \texttt{binomcdf}(10, 0.2, 1) \approx 0.6242.

Common mistake

Watch the endpoint when using the complement. P(X≥2)=1−P(X≤1)P(X \ge 2) = 1 - P(X \le 1), not 1−P(X≤2)1 - P(X \le 2). Write the values that are excluded before you subtract.

Mean, standard deviation and shape

Mean and standard deviation of a binomial random variable

μX=np,σX=np(1−p).\mu_X = np, \qquad \sigma_X = \sqrt{np(1 - p)}.

For the guessing student, μX=10(0.2)=2\mu_X = 10(0.2) = 2 correct answers and σX=10(0.2)(0.8)=1.6≈1.26\sigma_X = \sqrt{10(0.2)(0.8)} = \sqrt{1.6} \approx 1.26. Over many such quizzes, a guessing student would average 2 correct, typically varying from 2 by about 1.26 questions.

The shape depends on pp and nn. With pp below 0.50.5 the distribution is skewed right, with pp above 0.50.5 it's skewed left, and with p=0.5p = 0.5 it's symmetric. As nn grows, the distribution becomes more symmetric and bell-shaped. A common guideline says it is approximately normal when np≥10np \ge 10 and n(1−p)≥10n(1-p) \ge 10, which you will use heavily in Unit 5.

Binomial distribution with n = 5 and p = 0.2. It is skewed right. P(X = 5) = 0.0003 is too small to see.

Tip

Check that your answer is reasonable using the mean. If μX=2\mu_X = 2, then P(X=3)P(X = 3) being about 0.20.2 is sensible; a result like 0.90.9 would signal an error.

Practice

Practice 1

Which random variable has a binomial distribution?

Practice 2

XX is binomial with n=8n = 8 and p=0.3p = 0.3. Find P(X=2)P(X = 2). Round to 4 decimal places.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

For the same XX (binomial, n=8n = 8, p=0.3p = 0.3), find P(X≤1)P(X \le 1). Round to 4 decimal places.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

About 12%12\% of adults in a large city are left-handed. In a random sample of 50 adults, let XX = the number who are left-handed. Find the mean of XX.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

For XX in the previous problem, find the standard deviation. Round to 2 decimal places.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

A basketball player makes 60%60\% of her three-point attempts. Assume attempts are independent. In 15 attempts, find the probability she makes at least 12. Round to 4 decimal places.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

A school has 900 students, and 40%40\% of them ride the bus. A random sample of 60 students is selected without replacement. Why is it reasonable to model the number of bus riders in the sample as binomial?

Practice 8

A student guesses on all 10 questions of a quiz where each question has 5 choices. Find the probability that the student gets at least 4 correct. Round to 4 decimal places.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.