Transcript Chap5

Introduction to Probability
and Statistics
Chapter 5
Discrete Distributions
Discrete Random
Variables
• Discrete random variables take on only
a finite or countable many of values.
Number of heads in 1000 trials of coin tossing
Number of cars that enter UNI in a certain day
Binomial Random Variable
• The coin-tossing experiment is a simple example of a
binomial random variable. Toss a fair coin n = 3 times
and record
• x = number of heads.
x
0
1
2
3
p(x)
1/8
3/8
3/8
1/8
Example
• Toss a coin 10 times
• For each single trial, probability of
getting a head is 0.4
• Let x denote the number of heads
The Binomial Experiment
1. The experiment consists of n identical trials.
2. Each trial results in one of two outcomes,
success (S) or failure (F).
3. Probability of success on a single trial is p
and remains constant from trial to trial. The
probability of failure is q = 1 – p.
4. Trials are independent.
5. Random variable x, the number of
successes in n trials.
x – Binomial random variable with
parameters n and p
Binomial or Not?
m
m m
m mm
• A box contains 4 green M&Ms and 5
red ones
• Take out 3 with replacement
• x denotes number of greens
• Is x binomial?
Yes,
3 trials are independent with
same probability of getting a
green.
Binomial or Not?
m
m m
m mm
• A box contains 4 green M&Ms and 5
red ones
• Take out 3 without replacement
• x denotes number of greens
• Is x binomial?
NO, when we take out the
second M&M, the probability
of getting a green depends on
color of the first.
3 trials are dependent.
Binomial or Not?
• Very few real life applications
satisfy these requirements exactly.
• Select 10 people from the U.S. population,
and suppose that 15% of the population has
the Alzheimer’s gene.
• For the first person, p = P(gene) = .15
• For the second person, p  P(gene) = .15,
even though one person has been removed
from the population…
• For the tenth person, p  P(gene) = .15
Yes, independent trials with the
same probability of success
Binomial Random Variable
• Rule of Thumb:
Sample size n; Population size N;
If n/N < .05, the experiment is Binomial.
• Example: A geneticist samples 10
people and x counts the number who
have a gene linked to Alzheimer’s
disease.
• Success:
• Number of
n = 10
Has gene
trials:
•
Probability
of
• Failure:
Success p = P(has gene) = 0.15
Doesn’t have gene
Example
• Toss a coin 10 times
• For each single trial, probability of getting a
head is 0.4
• Let x denote the number of heads
Find probability of getting exactly 3 heads.
i.e. P(x=3).
Find probability distribution of x
Solution
• Simple events:
Strings of H’s and T’s
with length 10
• Event A: {strings with exactly 3 H’s};
HTTTHTHTTT
TTHHTTTTHT…
• Probability of getting a given string in A:
3
HTTTHTHTTT
• Number of strings in A
(0.4) (0.6)
10
3
C
• Probability of event A. i.e. P(x=3)
3
7
C10
(0.4)
(
0
.
6
)
3
7
A General Example
• Toss a coin n times; For each single trial,
probability of getting a head is p;
• Let x denote the number of heads;
Find the probability of getting exactly k
heads. i.e. P(x=k)
Find probability distribution of x.
Binomial Probability
Distribution
• For a binomial experiment with n trials and
probability p of success on a given trial, the
probability of k successes in n trials is
P( x  k )  C p q
n
k
k
nk
for k  0,1,2,...n
n!
Recall C 
k!(n  k )!
with n! n(n  1)(n  2)...(2)1 and 0! 1.
n
k
Binomial Mean, Variance and
Standard Deviation
• For a binomial experiment with n trials and
probability p of success on a given trial, the
measures of center and spread are:
Mean :   np
Variance:   npq
2
Standard Deviation:   npq
Example
A marksman hits a target 80% of the
time. He fires 5 shots at the target.
What is the probability that exactly 3 shots hit
the target?
n=
5
hit
success =
P( x  3)  C p q
n
3
3
n3
p = .8
x = # of hits
5!

(.8)3 (.2)53
3!2!
 10(.8)3 (.2) 2  .2048
Example
What is the probability that more than 3 shots
hit the target?
P( x  3)  P(4)  P(5)
C p q
5
4
4
5 4
5 5 5
C p q
5
5
5!
5!
4
1

(.8) (.2) 
(.8)5 (.2)0
4!1!
5!0!
 5(.8) 4 (.2)  (.8)5  .7373
Example
• x = number of hits.
• What are the mean and standard
deviation for x? (n=5,p=.8)
Mean :   np  5 (.8 )  4
Standard Deviation :  


5 (.8 )(.2 )  .89
npq
Cumulative Probability
You can use the cumulative probability tables
to find probabilities for selected binomial
distributions.
Binomial cumulative probability:
P(x  k) = P(x = 0) +…+ P(x = k)
Key Concepts
I. The Binomial Random Variable
1. Five characteristics:
the experiment consists of n identical trials;
each resulting in either success S or failure F;
probability of success is p and remains constant;
all trials are independent;
x is the number of successes in n trials.
2. Calculating binomial probabilities
a. Formula: P( x  k )  Ckn pk qnk
b. Cumulative binomial probability P(x  k).
3. Mean of the binomial random variable:

4. Variance and standard deviation:
 2  npq
  npq
np
Example
According to the Humane Society of the
United States, there are approximately 40% of
U.S. households own dogs. Suppose 15
households are selected at random. Find
1.
2.
3.
4.
probability that exactly 8 households own dogs?
probability that at most 3 households own dogs?
probability that more than 10 own dogs?
the mean, variance and standard deviation of
x, the number of households that own dogs.
Example
According to the Humane Society of the
United States, there are approximately 40% of
U.S. households own dogs. Suppose 15
households are selected at random.
What is probability that exactly 8 households own
dogs?
n=
x= #
households
15
8
158
P( x  8)  C8 (.4) (.6)
that own
dog
 6435(.4)8 (.6)7  .118
15
success = own dog
p = .4
Example
What is the probability that at most 3
households own dogs?
P( x  3)  P(0)  P(1)  P(2)  P(3)
 C (.4) (.6)  C (.4) (.6)  C (.4) (.6)  C (.4) (.6)
15
0
0
15
15
1
1
14
15
2
 .0005  .0047  .0219  .0634
 .091
2
13
15
3
3
12
Example
What are the mean, variance
and standard deviation of
random variable x?
(n=15, p=.4)
  np  15(.4)  6
 2  npq  15(.4)(.6)  3.6
   2  3.6  1.90
Binomial Probability
• Probability distribution for Binomial random
variable x with n=15, p=0.4
Probability Distribution of Binomial n=15, p=.4
0.20
P(x)
0.15
0.10
0.05
0.00
0
2
4
6
8
x
10
12
14
16
1.
Example
What are the mean,
variance and standard
deviation of random
variable x?
2. Calculate interval
within 2 standard
deviations of mean.
What values fall into
this interval?
  np  15(.4)  6
 2  npq  15(.4)(.6)  3.6
   2  3.6  1.90
  2  6  2(1.9)  2.2
  2  6  2(1.9)  9.8
(2.2, 9.8)
3,4,5,6,7,8,9
3. Find the probability
that x fall into this
interval.
P(3  x  9)  P(3)  P(4)  ... P(9)  .939