Chapter: 4
Random Variables and
Probability Distributions
What you will learn
Binomial
Section 4.3
Discrete
Poisson and
Section 4.2
Hypergeometric
Section 4.4
Random
Variables
Section 4.1 Normal
Section 4.6
Continuous
Section 4.5
Uniform and
Exponential
Section 4.7
2
Binomial Distribution
Section 4.3
Bernoulli random variable
Bernoulli Experiment
➢ One trial
➢ Two possible outcomes: S (for success) and F (for failure).
➢ This probability of success is denoted by p, and the probability of
F is denoted by q. Note that q = 1 – p.
Bernoulli Random Variable ( ): ∼
➢ = 1 if the trial is succeeded, and 0 if failed
( ) = 1 ⋅ + 0 ⋅ (1 − ) =
∑
Expectation: = ( )=
( )
2
∑
Variance: v ( ) = − ( )
= (1 − ) ⋅ + (0 − ) ⋅ (1 − ) = (1 − ) 4
2 2
𝑎
𝑟
𝑋
𝑝
𝑝
𝑥
𝜇
𝑝
𝑝
𝑥
𝑝
𝑝
𝑝
𝜇
𝐸
𝑋
𝑥
𝑝
𝑥
𝑝
𝑝
𝑝
𝑿
𝑩
𝒆
𝐫
𝒑
𝑋
Binomial Random Variable
Binomial Experiment
➢ The experiment consists of n identical trials.
➢ Two possible outcomes on each trial: S (for success) and F (for
failure).
➢ The probability of S remains the same from trial to trial. This
probability is by p, and the probability of F is q = 1 – p.
➢ The trials are independent.
Binomial Random Variable ~ ( , ):
➢ Number of (success) in identical and independent trials.
➢ Two parameters: and
➢ takes values in {0,1, 2,…, }
5
𝑿
𝑋
𝑆𝑛𝑛𝑝
𝑩
𝒏
𝒑
𝑛
Binomial Examples
Binomial Random Variable: Number of ‘successes’ in n
trials
➢ Number of defective items in a batch of 5 items
➢ Number correct answers on a 33-question exam
➢ Number of customers who purchase out of 100
customers who enter store
6
Accessing Binomial
Decide whether x is a binomial random variable:
• You randomly select 3 bonds out of a possible 10 for an
investment portfolio. Unknown to you, 8 of the 10 will
maintain their present value, and the other 2 will lose value due
to a change in their ratings. Let x be the number of the 3 bonds
you select that lose value.
7
Accessing Binomial
Decide whether x is a binomial random variable:
• Before marketing a new product on a large scale, many
companies will conduct a consumer preference survey to
determine whether the product is likely to be successful.
• Suppose a company develops a new diet soda and then
conducts a taste preference survey in which 100 randomly
chosen consumers state their preferences among the new soda
and the two leading sellers. Let x be the number of the 100 who
choose the new brand over the two others.
8
Accessing Binomial
➢ In most real-life applications of the binomial distribution, the
population of interest has a finite number of elements (trials),
denoted N.
➢ When N is large and the sample size n is small relative to N,
say n/N … .05, the sampling procedure, for all practical
purposes, satisfies the conditions of a binomial experiment.
9
Accessing Binomial
Decide whether x is a binomial random variable:
• Some surveys are conducted by using a method of sampling
other than simple random sampling (defined in Chapter 3).
• For example, suppose a television cable company plans to
conduct a survey to determine the fraction of households in the
city that would use the cable television service. The sampling
method is to choose a city block at random and then survey
every household on that block. This sampling technique is
called cluster sampling.
• Suppose 10 blocks are so sampled, producing a total of 124
household responses. Let x be the number of the 124
households that would use the television cable service.
10
Binomial Probability Distribution Function (PDF)
⎛ n ⎞ x n− x n! x n− x
p( x) = ⎜ ⎟ p q = p (1 − p )
⎝ x⎠ x ! (n − x)!
Number of sample Probability of x S’s and (n-x)
points with x S’s F’s in any sample point
p(x) = Probability of getting x ‘successes’ in n trials
n = No. of trials
p = Probability of ‘Success’ in each trial
x = Number of ‘Successes’ in n trials
(x = 0, 1, 2, ..., n)
11
Binomial Example
Deriving the Binomial Distribution
A retailer sells both the Apple iPhone and Google Android cell
phones online. Assume that 80% of the phones the retailer sells
online are iPhones and 20% are Androids.
➢ Use the steps given in Chapter 3 (box on p. 157) to find the
probability that three of the next four online cell phone
purchases are Androids.
1. Define the experiment.
• Cell phone type of next four online purchases
12
Binomial Example
Deriving the Binomial Distribution
2. List the sample points associated with the experiment.
13
Binomial Example
Deriving the Binomial Distribution
3. Assign probabilities to the sample points.
• Multiplicative rule, each customer is independent
For example:
• ( )
• ( )
• ( )
• Event of interest and its
sample points
• E = {Three of the next ( ) = 0.2, ( ) = 0.8
four are Androids} 14
𝑃
𝑃
𝑃
𝐴
𝐴
𝐴
𝐴
𝐴
𝐴
𝐼
𝐴
𝐴
𝐼
𝐼
𝐴
𝑃
𝐴
𝑃
𝐼
Binomial Example
Deriving the Binomial Distribution
Solution:
3. ( ) = 0.2; P(I) =
0.8
4. P(AAAI) =
0.23 × 0.8
5. P(AAIA) = P(AIAA)
= P(IAAA) =
P(AAAI)
6. P(X=3) =
4 × 0.23 × 0.8
Each leaf does not have equal probability.
15
𝑃
𝐴
Binomial Example
Deriving the Binomial Distribution
A retailer sells both the Apple iPhone and Google Android cell
phones online. Assume that 80% of the phones the retailer sells
online are iPhones and 20% are Androids.
Solution:
( = 3) = ( h h = 3) ×
(0.2) ×
h
(0.8) 16
𝑃
𝑋
𝑁
𝑢
𝑚
𝑏
𝑒
𝑟
𝑜
𝑓
𝑠
𝑎
𝑚
𝑝
𝑙
𝑒
𝑝
𝑜
𝑖
𝑛
𝑡
𝑠
𝑓
𝑜
𝑟
𝑤
𝑖
𝑐
𝑋
𝑁
𝑢
𝑚
𝑏
𝑒
𝑟
𝑜
𝑓
𝑖
𝑃
𝑜
𝑛
𝑒
𝑠
𝑁
𝑢
𝑚
𝑏
𝑒
𝑟
𝑜
𝑓
𝐴
𝑛
𝑑
𝑟
𝑜
𝑖
𝑑
𝑠
Binomial PDF Example
Experiment: Toss 1 coin 5 times in a row. Note
number of tails. What’s the probability of 3 tails?
n! x n− x
p( x ) = p (1 − p )
x !( n − x )!
5!
p(3) = .53 (1 − .5)5−3
3!(5 − 3)!
17
= .3125
Binomial PDF Example
Experiment: A machine that produces stampings for automobile
engines is malfunctioning and producing 10% defectives. The
defective and non-defective stampings proceed from the machine in a
random manner. If the next five stampings are tested, find the
probability that three of them are defective?
Solution:
• Number of defective: X ~ B(n, p)
• P(X = x) =
• P(X = 3) =
18
Cumulative Distribution Function (CDF)
➢ PDF: ( ): → [0,1] (PDF)
• 0 ≤ p(x) ≤ 1 for all x
• Σ p(x) = 1
➢ PDF for Binomial Distribution:
• (0) = ( = 0), (1) = ( = 1), …, ( ) = ( = )
➢ Cumulative Distribution Function (CDF)
∑
( )= ( ≤ )= ()
•
≤
• ( < ≤ )= ( )− ( )
• PDF B(n, p) for n = 10 and p = 0.10
𝑖
𝑥
• ( ≤ 2) shaded 19
𝐹
𝑥
𝑃
𝑋
𝑥
𝑝
𝑖
𝑝
𝑥
𝑥
𝑝
𝑃
𝑋
𝑝
𝑃
𝑋
𝑝
𝑛
𝑃
𝑋
𝑛
𝑃
𝑎
𝑋
𝑏
𝐹
𝑏
𝐹
𝑎
𝑃
𝑋
Binomial Probability Table (CDF)
X ~ B(10, 0.1) ( ≤ 2) = ? ( > 2) = ?
20
Textbook, P. 812, Table I, Binomial Probabilities
𝑃
𝑋
𝑃
𝑋
Binomial Probability Table (CDF)
n=5 p
k .01 … 0.50 … .99
0 .951 … .031 … .000
1 .999 … .188 … .000
2 1.000 … .500 … .000
3 1.000 … .812 … .001
4 1.000 … .969 … .049
p(X=3)= p( ≤ 3) – p( ≤ 2) = .812 – .500 = .312
21
Textbook, P. 812, Table I, Binomial Probabilities
𝑿𝑿
Binomial Distribution
Characteristics
n = 5 p = 0.1
Mean .6
μ = E(X)
P(X)
.3
.0
0 1 2 3 4 5
Variance X
n = 5 p = 0.5
σ 2 = var(X)
.6
P(X)
.3
Standard deviation .0
0 1 2 3 4 5 22
σ X
Binomial Distribution
Characteristics
(1 − ) ?
2
➢ Why = ( )= , =
∑(
− ) ( )
2 2
∑
➢ By definition = ( ), =
➢ Binomial r.v. : Number of successes in n trials
➢ Bernoulli r.v. for the -th trial:
• = 1 if the trial is succeeded, and 0 if failed
• ( )= , ( ) = (1 − )
➢ Key: = 1+ 2+⋯+
➢ Expectation: ( ) = ( 1) + ⋯ + ( ) =
➢ Variance (independence):
( )= ( 1) + ⋯ + ( ) = (1 − )
23
𝑛
𝑛
𝜎
𝑥
𝜇
𝑝
𝑥
𝑖
𝑛
𝜇
𝑥
𝑝
𝑥
𝑖
𝑖
𝜇
𝐸
𝑣
𝑎
𝑋
𝑟
𝐸
𝑋
𝑋
𝐸
𝑣
𝑋
𝑎
𝑛
𝑟
𝑝
𝑋
𝜎
𝑛
𝐸
𝑝
𝑋
𝑣
𝑎
𝑝
𝑟
𝑋
𝑛
𝑝
𝑛
𝑝
𝑝
𝑖
𝑋𝑋
𝑖
𝑋
𝑋
𝑋
𝑋
𝐸
𝑋
𝑝
𝑉
𝑎
𝑟
𝑋
𝑝
𝑝
𝑋
Binomial Mean and Var Example
➢ A machine that produces stampings for automobile engines is
malfunctioning and producing 10% defectives. The defective and
non-defective stampings proceed from the machine in a random
manner.
➢ Define a random variable as the number of defective items in the
next five stampings. Find mean and standard derivation .
Solution:
• ∼ ( , ), = 5, = 0.1
• = = 0.5
• 2
= (1 − ) = 0.45, = 0.67
∑(
− ) ( ) 2 2
∑
• Check by = ( ), =
• Check Empirical rule: approximately 91.9%, of the observations to fall 24
𝜎
𝑥
𝜇
𝑝
𝑥
within the interval
𝜇
𝑥
𝑝
𝑥
𝑋𝜇𝜎
𝑋
𝜎
𝐵
𝑛
𝑝
𝑛
𝑝
𝑝
𝑛
𝑝
𝜇
𝜎
𝑛
𝑝
Applet
homepage.stat.uiowa.edu/~mbognar/applets/bin.html
25
Exercise Binomial PDF
➢The probability of winning at a certain game is 0.10.
If you play the game 10 times, what is the probability
that you win at most once?
26
Exercise Binomial PDF
➢The probability is 0.04 that a person reached on a
“cold call” by a telemarketer will make a purchase. If
the telemarketer calls 40 people, what is the
probability that at least one sale with result?
27
Exercise Binomial Mean and Variance
➢Suppose you have a biased coin that lands heads with
probability and lands tails with probability 1 − . You
flip the coin = 5 times. Let be the number of times
the coin lands Heads.
➢ ( )=?
➢ ( )=?
➢ ( = 2) = ?
28
𝑝
𝑋𝐸
𝑛
𝑣
𝑃
𝑎
𝑟
𝑋
𝑋
𝑝
𝑋
Exercise Binomial Unionization
➢Suppose a poll of 20 employees is taken in a large
company. Suppose that 60% of all the company’s
employees favor unionization. The purpose is to
determine , the number who favor unionization.
➢ Find the distribution of . ( = 2) = ?
➢ ( ) = ? , Var( ) = ?
➢ ( ≥ 1) = ?
29
𝑋𝑋𝑃
𝐸
𝑃
𝑋
𝑋
𝑋
𝑋