Sunteți pe pagina 1din 32

Chapter 4: Discrete Random Variables and the Binomial Distribution

Chapter 4: Discrete Random Variables and the


Binomial Distribution
Keith E. Emmert
Department of Mathematics
Tarleton State University
June 16, 2011
Chapter 4: Discrete Random Variables and the Binomial Distribution
Outline
1
Random Variables
2
Binomial Random Variables
Chapter 4: Discrete Random Variables and the Binomial Distribution
Random Variables
Some Basic Denitions
A random variable is an uncertain numerical quantity whose
value depends on the random outcome of an experiment. We
can think of a random variable as a rule that assigns one (and
only one) numerical value to each outcome of a random
experiment.
A discrete random variable can assume at most a nite or
innite but countable number of distinct values.
A continuous random variable can assume any value in an
interval or collection of intervals.
Think of the capital letter X as
:::::::
random, the value of the
variable before it is observed. Think of x as
::::::
known, a
:::::::::
particular
:::::
value
::
of
:::
X that has been observed.
Chapter 4: Discrete Random Variables and the Binomial Distribution
Random Variables
Lets Do It
Random Variables
1
Otitis media, a disease of the middle ear, is one of the
frequent reasons for visiting a doctor in the rst 2 years of life
other than routine well-baby visit. Let X be the random
variable that represents the number of episodes of Otitis
media in the rst two years of life. What are the values, x,
the random variable X will assume?
2
Suppose a physician agrees to use a new anti-hypertensive
drug on a trial basis on the rst 4 untreated hypertensive
patients she encounters in her practice, before deciding
whether to adopt the drug for routine use. Let X be the
number of patients out of 4 who are brought under control.
What are the values, x, the random variable X can assume?
Chapter 4: Discrete Random Variables and the Binomial Distribution
Random Variables
Lets Do It
Random Variables
3
A study on eects of exposure to radiation was performed at
the Portsmouth Naval Shipyard, where each exposed worker
wore a dosimeter that measures the annual exposure in rem.
The cumulative exposure over a workers lifetime could then be
obtained by summing the yearly exposure. Let X be the
amount of cumulative exposure. What are the values, x, the
random variable X will assume?
4
A biology teacher gives a 30 minutes test. Dene the random
variable as the time it takes a student to nish the test. What
are the values, x, the random variable X will assume?
Chapter 4: Discrete Random Variables and the Binomial Distribution
Random Variables
Lets Do It
Random Variables
Random
Variable, X
Discrete
Continuous
Probability mass
function. Height
corresponds to
proability.
Probability
density function.
Area corresponds
to probability.
x
P
r
o
b
a
b
i
l
i
t
y
D
e
n
s
i
t
y
x
a b
a
Pr(X = a)
Pr(a X b)
Identify as discrete or continuous.
1
Reaction time dierence to same stimulus before and after
training.
2
The number of violent crimes committed per month in your
community.
Chapter 4: Discrete Random Variables and the Binomial Distribution
Random Variables
Probability Mass Functions
A probability mass function of a discrete random variable X
assigns to each observation, x
1
, x
2
, . . . , x
k
, a probability of
occurrence, p
1
, p
2
, . . . , p
k
. The values of a discrete probability
distribution (the assigned probabilities) must be between 0 and 1
and must add up to 1, that is

p
i
= p
1
+ p
2
+ + p
k
= 1.
We often group this information as a table or a function:
Value of X x
1
x
2
x
k
Probability Pr (X = x) p
1
p
2
p
k
p(x) =
_

_
p
1
, if x = x
1
p
2
if x = x
2
.
.
.
.
.
.
p
k
if x = x
k
.
Chapter 4: Discrete Random Variables and the Binomial Distribution
Random Variables
Lets Do It!
Probability Mass Functions
Determine which of the following represents a probability mass
function for a random variable X. Explain.
(a)
x 0 1 2 3
Pr (X = x) 0.26 0.32 0.42 0
(b)
x 0 1 2 3
Pr (X = x) 0.20 0.32 0.42 0.10
(c)
x 0 1 2 3
Pr (X = x) 0.26 0.32 0.42 0.10
(d)
x 0 1 2 3
Pr (X = x) 0.25 0.35 0.45 -0.05
(e) p(x) = 0.5 + x, x = 0.75, 0, 0.25.
(f) p(x) = 0.5 + x, x = 0.25, 0, 0.25.
Chapter 4: Discrete Random Variables and the Binomial Distribution
Random Variables
Example
Probability Mass Functions
Let X be the number of people in a household for a certain
community.
x 1 2 3 4 5 6 7
Pr (X = x) 0.20 0.32 0.18 0.15 0.07 0.03
(a) What must be the probability of 7 people in a household for
this to be a legitimate discrete distribution?
(b) Display this probability mass function graphically.
(c) What is the probability that a randomly chosen household
contains more than 5 people?
(d) What is the probability that a randomly chosen household
contains no more than 2 people?
(e) What is Pr (2 < X 4)? The probability that a randomly
selected household has more than 2 but at most 4 people.
Chapter 4: Discrete Random Variables and the Binomial Distribution
Random Variables
Lets Do It!
Probability Mass Functions
Researchers found the following probability values for the dental
habits of x, the age children begin brushing their teeth or gums.
x 0 1 2 3 4
Pr (X = x) 0.04 0.19 0.22 0.24 0.31
(a) Present the probability distribution function graphically.
(b) Find the Pr (X < 2).
(c) Find the probability of a child three years old or older
beginning to brush their teeth or gums?
(d) Using probability values, determine if it is unusual for a child
less than one year old to brush their teeth or gums.
Chapter 4: Discrete Random Variables and the Binomial Distribution
Random Variables
Expected Value of a Discrete Random Variable
Mean, Variance, and Standard Deviation
Suppose X is a discrete random variable taking on the values
x
1
, x
2
, . . . , x
k
, with probabilities p
1
, p
2
, . . . , p
k
.
The mean or expected value of X if given by
E(X) =
X
= x
1
p
1
+ x
2
p
2
+ + x
k
p
k
=
k

i =1
x
i
p
i
.
The variance of X is given by
Var (X) =
2
X
= E
_
(X
X
)
2

= E(X
2
) [E(X)]
2
=

x
2
i
p
i

2
X
.
The standard deviation of X is given by SD(X) =
X
=
_

2
X
.
Chapter 4: Discrete Random Variables and the Binomial Distribution
Random Variables
Example
Mean, Variance, and Standard Deviation
The probability mass function for the number of episodes of Otitis
media on the rst 2 years of life is given in the table.Let r denote
the number of episodes.
r 0 1 2 3 4 5 6
Pr (X = r ) 0.129 0.264 0.271 0.185 0.095 0029 0.017
The average (mean) number of episodes of Otitis media on the
rst two years of life is

X
= E(X) = 0(0.129) + 1(0.264) + 2(0.271) + 3(0.185) + 4(0.095)
+ 5(0.029) + 6(0.017) = 1.988
Thus, there are
X
= 1.988 episodes in the rst two years of life.
Continued...
Chapter 4: Discrete Random Variables and the Binomial Distribution
Random Variables
Example
Mean, Variance, and Standard Deviation
The probability mass function for the number of episodes of Otitis
media on the rst 2 years of life is given in the table. Let r denote
the number of episodes.
r 0 1 2 3 4 5 6
Pr (X = r ) 0.129 0.264 0.271 0.185 0.095 0029 0.017
The variance is Var (X) =
2
X
= E(X
2
)
2
X
.. Hence, we need
E(X
2
).
E(X
2
) = 0
2
(0.129) + 1
2
(0.264) + 2
2
(0.271) + 3
2
(0.185) + 4
2
(0.095)
+ 5
2
(0.029) + 6
2
(0.017) = 5.87
So the variance and the standard deviation can be computed

2
X
= E(X
2
)
2
X
= (5.87 (1.988)
2
= 1.92
and
X
=
_

2
X
=

1.92 = 1.39.
Chapter 4: Discrete Random Variables and the Binomial Distribution
Random Variables
Lets Do It!
Mean, Variance, and Standard Deviation
A Pharmacy has a drive-through service. The number of customers
arriving during a 15-minute period is distributed as shown. Find
the mean, variance, and standard deviation for the distribution.
# of Customers, x 0 1 2 3 4
Pr (X = x) 0.12 0.20 0.31 0.25 0.12
Chapter 4: Discrete Random Variables and the Binomial Distribution
Random Variables
Lets Do It!
Mean, Variance, and Standard Deviation
The following distribution shows the number of students enrolled
in CPR classes oered by the local re department. Find the
mean, variance, and standard deviation for the distribution
# of Students, x 12 13 14 15 16
Pr (X = x) 0.15 0.20 0.38 0.18 0.09
Chapter 4: Discrete Random Variables and the Binomial Distribution
Binomial Random Variables
Combinations
For a positive integer n, factorial of n is
n! = n(n 1)(n 2) (2)(1).
For convenience, we dene 0! = 1.
n choose x represents the number of ways of selecting x items
(without replacement) from a set of n distinguishable items
when the order of the selection is not important is given by:
_
n
x
_
=
n!
x!(n x)!
provided 0 x n.
If x < 0 or x > n, then we dene
_
n
x
_
= 0 (it is hard to pick a
negative number of things or to pick more things than are
available).
Chapter 4: Discrete Random Variables and the Binomial Distribution
Binomial Random Variables
Example
Combinations
How many subsets of S = {1, 2} are there which contain...
# Subsets Answer Subsets Combination
0 1
_
2
0
_
= 1
1 2 {1}, {2}
_
2
1
_
= 2
2 1 S = {1, 2}
_
2
2
_
= 1
How many subsets of S = {1, 2, 3} are there which contain...
# Subsets Answer Subsets Combination
0 1
_
3
0
_
= 1
1 2 {1}, {2}, {3}
_
3
1
_
= 3
2 1 {1, 2}, {1, 3}, {2, 3}
_
3
2
_
= 3
3 1 S = {1, 2, 3}
_
3
3
_
= 1
Chapter 4: Discrete Random Variables and the Binomial Distribution
Binomial Random Variables
Example
Combinations with the Calculator Using nCr
Find the number of ways to select 2 apples from a bag of 20 apples.
By hand, calculate
_
20
2
_
=
20!
2!(20 2)!
=
20 19 18 17 2 1
2 1 18 17 2 1
=
20 19
2
= 190.
By calculator, follow these instructions
2 0 MATH
3 2
ENTER
Total # of items, n = 20
for the operation nCr
the # of items to
select, r = 2
Your calculator should give you 190 as an answer.
Chapter 4: Discrete Random Variables and the Binomial Distribution
Binomial Random Variables
Lets Do It!
How many subsets of S = {1, 2, 3, 4} are there which contain...
# Subsets Answer Subsets Combination
0 1
1 {1}, {2}, {3}, {4}
2
_
4
2
_
= 6
3 4
_
4
3
_
= 4
4 S = {1, 2, 3, 4}
Complete the table.
The set S has 4 values, so the total number of possible
subsets is 2
4
= . Conrm that this does this equal the
total of the answer column.
Chapter 4: Discrete Random Variables and the Binomial Distribution
Binomial Random Variables
Bernoulli Random Variables
A dichotomous or Bernoulli random variable is one which has
exactly two possible outcomes, often referred to as success and
failure. In this text we will only consider such variables in which
the success probability p remains the same if the random
experiment were repeated under identical conditions. The failure
probability, q = 1 p.
Chapter 4: Discrete Random Variables and the Binomial Distribution
Binomial Random Variables
Lets Do It!
Bernoulli Random Variables
(a) The national incidence rate of chronic bronchitis in children in
their rst year of life in households where both parents are
chronic bronchitis is 5%. A researcher investigates 20
households where both parents are chronic bronchitis. If
success is dened be child in his rst year of life with chronic
bronchitis, what is the probability of success? What is the
probability of failure?
Success: p = Failure: q =
(b) Suppose that the rate of major congenital malformations in
the general population is 2.5 malformations per 100 deliveries.
A sample of 100 infants identied in birth registry as ospring
of Vietnam-veteran fathers. If success is dened be infant
with congenital malformation, what is the probability of
success? What is the probability of failure?
Success: p = Failure: q =
Chapter 4: Discrete Random Variables and the Binomial Distribution
Binomial Random Variables
Binomial Random Variables
A binomial random variable X is the total number of successes in n
independent Bernoulli trials where on each trial the probability of a
success is p.
Basic Properties of a Binomial Experiment
The experiment consists of n identical trials.
Each trial has two possible outcomes (success, failure).
The trials are independent.
The probability of a success, p, remains the same for each
trial. The probability of a failure is q = 1 p.
X can take on the values 0, 1, 2, . . . , n.
Chapter 4: Discrete Random Variables and the Binomial Distribution
Binomial Random Variables
Lets Do It!
Binomial Random Variables
Determine which of the following is a binomial experiment?
Explain.
(a) Surveying 100 people to determine if they like Sudsy Soap.
(b) Asking 1000 people which brand of cigarettes they smoke.
(c) Testing one brand of aspirin by using 10 people to determine
whether it is eective.
(d) Asking 100 people if they smoke.
(e) Surveying 300 prisoners to see how many dierent crimes they
were convicted of.
(f) Surveying 300 prisoners to see whether this is their rst
oense.
Chapter 4: Discrete Random Variables and the Binomial Distribution
Binomial Random Variables
Binomial Probability Distribution
The Math
The binomial probability distribution is
p(x) = Pr (X = x) =
_
n
x
_
p
x
q
nx
, x = 0, 1, 2, . . . , n,
where
p is the probability of a success on each single trial
q = 1 p is the probability of failure on each single trial
n is the number of independent trials
x is the number of success in the n trials.
The mean is
X
= E(X) = np.
The variance is
2
X
= Var (X) = npq = np(1 p).
The standard deviation is

X
=
_

2
X
=

npq =
_
np(1 p).
Chapter 4: Discrete Random Variables and the Binomial Distribution
Binomial Random Variables
Binomial Probability Distribution
The Math
Assume that X follows a binomial probability distribution with n
trials and probability of success p.
Then, Pr (X = x) =
_
n
x
_
p
x
q
nx
, x = 0, 1, 2, . . . , n.
The cumulative distribution for a binomial random variable is
Pr (X x) =
x

i =0
Pr (X = i )
= Pr (X = 0) + Pr (X = 1) + + Pr (X = x).
The word cumulative is used because it accumulates all
of the probability from 0 to x.
Chapter 4: Discrete Random Variables and the Binomial Distribution
Binomial Random Variables
Binomial Probability Distribution
Using the TI-84
Suppose your probability of success is
1
3
with n = 4 trials of a
binomial experiment.
The probability of obtaining exactly three successes is
0.0987...
4 3 ENTER
2nd Vars brings up the DISTR menu
0 selects the binomPDF(n, p, x) function
,
1 3
,
)
The probability of obtaining at most two successes is 0.8889...
Chapter 4: Discrete Random Variables and the Binomial Distribution
Binomial Random Variables
Lets Do It!
Binomial Probability Distribution
According to 2001 study of college students by Harvard Universitys
School of Public Health 20% of those included in the study abstain
from drinking. A random sample of six college students is selected.
Identify the following:
A trial =
n = number of independent trials
p = probability of a success on each single trial
x = number of successes in the n trials
1
What is the probability that exactly three students in this
sample abstain from drinking?
2
What is the probability that at most two students in this
sample abstain from drinking?
3
What is the probability that less than two students in this
sample abstain from drinking?
Continued...
Chapter 4: Discrete Random Variables and the Binomial Distribution
Binomial Random Variables
Lets Do It!
Binomial Probability Distribution
According to 2001 study of college students by Harvard Universitys
School of Public Health 20% of those included in the study abstain
from drinking. A random sample of six college students is selected.
Identify the following:
A trial =
n = number of independent trials
p = probability of a success on each single trial
x = number of successes in the n trials
4
What is the probability that at least three students in this
sample abstain from drinking?
5
What is the probability that more than three students in this
sample abstain from drinking?
6
What is the mean and standard deviation of the number of
students abstaining from drinking?
Chapter 4: Discrete Random Variables and the Binomial Distribution
Binomial Random Variables
Lets Do It!
Binomial Probability Distribution
The national incidence rate of chronic bronchitis in children in their
rst year of life in households where both parents are chronic
bronchitis is 5%. A researcher investigates 20 households where
both parents are chronic bronchitis.
(a) How likely are infants in at least 3 out of 20 households to
develop chronic bronchitis?
(b) What is the mean and standard deviation of the number of
households, where both parents are chronic bronchitis, with
infants having chronic bronchitis?
Chapter 4: Discrete Random Variables and the Binomial Distribution
Binomial Random Variables
When Is It Extreme?
The national incidence rate of chronic bronchitis in children in their
rst year of life in households where both parents are chronic
bronchitis is 5%. We wish to test unusual occurrences of chronic
bronchitis when n = 1, 500 and x = 75.
Pr (X = 75) =
_
1500
75
_
(0.05)
75
(0.95)
150075
= 0.0472. Note
that 5% of 1,500 is 75 (the national average!), and yet this
occurs with a small probability. This doesnt make intuitive
sense.
Another approach is to nd the probability of obtaining a
result
::
at
::::
least
:::
as
::::::::
extreme
:::
as
:::
the
::::
one
:::::::::
obtained, that is
Pr (X 75) = 1 Pr (X < 75) = 1 Pr (X 74) = 0.5165,
a very likely event!
Compare to Pr (X 90) = 1 Pr (X 89) = 0.0361, an
unlikely event occurs with just 15 more cases!
Chapter 4: Discrete Random Variables and the Binomial Distribution
Binomial Random Variables
Lets Do It!
Binomial Probability Distribution
Suppose that the rate of major congenital malformations in the
general population is 2.5 malformations per 100 deliveries. A study
is set up to investigate if the ospring of Vietnam-veteran fathers
are at special risk for congenital malformations.
(a) A sample of 100 infants identied in birth registry as ospring
of Vietnam-veteran fathers and 4 have a major congenital
malformation. Is there an excess risk of malformation in this
group, i.e. compute the probability that at least 4 occurs.
(b) Find the mean and the standard deviation of the number of
malformations of the ospring of Vietnam-veteran fathers.
Chapter 4: Discrete Random Variables and the Binomial Distribution
Binomial Random Variables
Homework
HW page 112: 2*, 3*, 6, 7, 8, 9, 10, 14, 15, 34, 39, 40
* For #2 and #3 use the following distribution
x Pr (X = x)
0 0.72
1 0.26
2 0.02