The binomial distribution is one of the
important probability distribution functions. Random variables with this
type of distributions are common and useful. In particular, in later
chapters, we will use the binomial distribution when we ask questions
about population proportions. Binomial distributions are easy to
identify. Just look for outcomes with two possibilities.
Binomial Experiment
A binomial probability distribution
results from a binomial experiment that
meets the following four requirements:
- Each of \(n\) trials has two
possible outcomes. \(S\) (success) and
\(F\) (failure) will denote the two
possible outcomes.
- The probabilities must remain constant for each trial: \(P(S)= p\) and \(P(F) =1-p\).
- The \(n\) trials are independent.
(The outcome of one trial does not affect the probabilities in the other
trials.)
- There is a finite number of trials.
Example 1 Verify the following are examples
of random variables with binomial distributions:
- Flip a coin three times and let \(X\) be the number of heads.
- Randomly picking 14 newborns and and let \(X\) be the number of girls.
- Consider a class of 30 students and let \(X\) be the number of students show up on a
particular day.
Binomial Probability Distribution
The probability of obtaining \(x\)
successes in \(n\) independent trials
of a binomial experiment is \[P(x) =
{n\choose x}\cdot p^x \cdot(1-p)^{n-x}\]
To calculate the probability of exactly \(x\) success in \(n\) independent trials with \(P(S)=p\):
dbinom(x, size = n, prob = p)
To calculate the probability of up to \(x\) success in \(n\) independent trials with \(P(S)=p\):
pbinom(x, size = n, prob = p)
To plot the distribution
x <- 0:n
plot(x, dbinom(x, n, p), type = "h")
Example 2 Flip a fair coin three times and
find the distribution of the total number of heads.
Example 3 Recall that at the beginning of
the semester we guessed on a 10 problem true or false quiz.
- What is the probability that the student gets exactly 6
correct?
- What is the probability that the student gets exactly 7
correct?
- What is the probability that the student gets exactly 8
correct?
- What is the probability that the student gets exactly 9
correct?
- What is the probability that the student gets all questions
correct?
- What is the probability for the student to pass (6 or more)?
Example 4 Consider a quiz of five
multiple-choices questions. Each question has four available
choices.
- What is the probability that the student gets exactly 3
correct?
- What is the probability that the student gets exactly 4
correct?
- What is the probability that the student gets all questions
correct?
- What is the probability for the student to pass (3 or more)?
Example 5 Suppose you are in charge of the
booking policy for small commuter planes, capacity 90. Since past
studies show that 3% of the booked passengers fail to arrive for the
flight, you wonder whether you should overbook the flight. If you did,
you could sell more tickets. On the other hand, if you sell more tickets
than spaces, and everyone happens to show up, you will have disgruntled
customers. What is your decision?
Expected Value and the Variance
A Bernoulli random variable takes either
the value of 1 or 0. Assume the probability of getting the value of 1 is
\(p\).
|
\(B\)
|
\(P(B)\)
|
|
1
|
\(p\)
|
|
0
|
\(1-p\)
|
\[E[B] = \qquad \mbox{and} \qquad Var(B) =
\]
A
binomial random variable
\(X\) is the sum of
\(n\) Bernoulli random variables. Because
\[E[A + B] = E[A] + E[B] \quad
\mbox{and}\quad Var[A+B] = Var[A] + Var[B],\] We have
\[E[X] = np \quad \mbox{and}\quad Var(X)
=np(1-p).\]
Ross 5.26 Suppose that each screw produced
is independently defective with probability 0.01. Find the expected
value and variance of the number of defective screws in a shipment of
size 1000.
Example 6 If \(X\) is a binomial random variable with
expected value 4.5 and variance 0.45, find
- \(P\{X=3\}\)
- \(P\{X\ge 4\}\)