Lec 8-9
Lec 8-9
and Statistical
Thinking
3.1
2. Venn Diagram
T
H
S
Sample Space Examples
Compound events:
Composition of two or more other events.
Can be formed in two different ways.
Unions & Intersections
1. Union
Outcomes in either events A or B or both
‘OR’ statement
Denoted by symbol (i.e., A B)
2. Intersection
Outcomes in both events A and B
‘AND’ statement
Denoted by symbol (i.e., A B)
Event Union:
Venn Diagram
Experiment: Draw 1 Card. Note Kind, Color
& Suit.
Event
Ace Black Black:
Sample
Space: 2,
2, 2,
2,...,
2, ..., A S A
Event Ace: Event Ace Black:
A, A, A, A A, ..., A, 2, ..., K
Event Union:
Two–Way Table
Experiment: Draw 1 Card. Note Kind, Color
& Suit. Color Simple
Sample Space Type Red Total
Black Event
(S): Ace:
Ace Ace & Ace & Ace
2, 2, Red Black A,
2, ..., A
Non-Ace Non & Non & Non-
Red Black Ace
A,
Event Total Red Black S
Ace Black: A,
Simple Event Black:
A,..., A, 2, ..., K A
2, ..., A
Event Intersection:
Venn Diagram
Experiment: Draw 1 Card. Note Kind, Color
& Suit.
Event
Ace Black Black:
Sample
Space: 2,...,A
2, 2,
2, ..., A S
Event Ace: Event Ace Black:
A, A, A, A A, A
Event Intersection:
Two–Way Table
Experiment: Draw 1 Card. Note Kind, Color
& Suit.
Color Simple
Sample Space Type Red Total
Black Event
(S): Ace:
Ace Ace & Ace & Ace
2, 2, Red Black A, A,
2, ..., A
Non-Ace Non & Non & Non-
A, A
Event
Red Black Ace
Total Red Black S
Ace Black:
A, A Simple Event Black: 2, ..., A
Compound Event Probability
Event
Event B1 B2 Total
A1 P(A 1 B1) P(A 1 B2) P(A 1)
A2 P(A 2 B1) P(A 2 B2) P(A 2)
Total P(B 1) P(B 2) 1
Color
Type Red Black Total
Ace 2/52 2/52 4/52
Non-Ace 24/52 24/52 48/52 P(Ace)
Complementary Events
Complementary Events
Complement of Event A
The event that A does not occur
All events not in A
Denote complement of A by AC
AC
A
S
Rule of Complements
The sum of the probabilities of complementary
events equals 1:
P(A) + P(AC) = 1
AC
A
S
Complement of Event
Example
Experiment: Draw 1 Card. Note Color.
Black
Sample
Space:
2, 2,
2, ..., A S
Event Black: Complement of Event Black,
2, 2, ..., A BlackC: 2, 2, ..., A, A
3.4
Sample
Outcomes
in Event
Space: Heart:
2, 2,
2, ..., A
S
2, 3, 4 ,
..., A
Event Spade:
Events and are Mutually Exclusive
2, 3, 4, ..., A
Additive Rule
1. Used to get compound probabilities for union of
events
2. P(A OR B) = P(A B)
= P(A) + P(B) – P(A B)
3. For mutually exclusive events:
P(A OR B) = P(A B) = P(A) + P(B)
Additive Rule Example
Conditional Probability
Conditional Probability
1. Event probability given that another event
occurred
2. Revise original sample space to account for
new information
Eliminates certain outcomes
Black ‘Happens’:
Eliminates All
Ace Black Other Outcomes
Black
S (S)
1. P(A|D) = Event
2. P(C|B) = Event C D Total
A 4 2 6
B 1 3 4
Total 5 5 10
Solution*
P A B 2 5 2
P A D
P D 5 5
10
P C B 110 1
P C B
P B 4 4
10
3.6
1. P(C B) = Event
Event C D Total
2. P(B D) =
A 4 2 6
3. P(A B) = 1 3 4
B
Total 5 5 10
Solution*
5 1 1
P C B P C P B C
10 5 10
4 3 6
P B D P B P D B
10 5 25
P A B P A P B A 0
Tree Diagram
Experiment: Select 2 pens from 20 pens: 14
blue & 6 red. Don’t replace.
Dependent!
5/19 R P(R R)=(6/20)(5/19) =3/38
6/20 R
14/19 B P(R B)=(6/20)(14/19) =21/95
14/20
6/19 R P(B R)=(14/20)(6/19) =21/95
B
13/19
B P(B B)=(14/20)(13/19) =91/190
3.7
Bayes’s Rule
Bayes’s Rule
P(Bi A)
P(Bi | A)
P( A)
P(Bi )P( A | Bi )
P(B1 )P( A | B1 ) P(B2 )P( A | B2 ) ... P(Bk )P( A | Bk )
Bayes’s Rule Example
A company manufactures MP3 players at two
factories. Factory I produces 60% of the MP3
players and Factory II produces 40%. Two
percent of the MP3 players produced at Factory I
are defective, while 1% of Factory II’s are
defective. An MP3 player is selected at random
and found to be defective. What is the probability
it came from Factory I?
Bayes’s Rule Example
0.02 Defective
Factory
0 .6 I
0.98 Good
0.01 Defective
0 .4 Factory
II
0.99 Good
P(I | D)
P(I )P(D | I ) 0.6 0.02
0.75
P(I )P(D | I ) P(II )P(D | II ) 0.6 0.02 0.4 0.01
Key Ideas
1. 0 ≤ P(Si) ≤ 1
2.
P S 1
i
Key Ideas
Random Sample
Combinations Rule
Bayes’s Rule
P( Bi ) P( A | Bi )
P( Bi | A)
P ( B1 ) P ( A | B1 ) P ( B2 ) P ( A | B2 ) ... P ( Bk ) P ( A | Bk )
Thinking Challenge
You’re taking a 33 question
multiple choice test. Each
question has 4 choices.
Clueless on 1 question, you
decide to guess. What’s the
chance you’ll get it right?
If you guessed on all 33
questions, what would be your
grade? Would you pass?
4.1
P x 3 x µ 3 89 1.00
4.3
x x ! (n x )!
p(x) = Probability of x ‘Successes’
p = Probability of a ‘Success’ on a
single trial
q = 1–p
n = Number of trials
x = Number of ‘Successes’ in n trials
(x = 0, 1, 2, ..., n)
n–x = Number of failures in n trials
Binomial Probability
Distribution Example
5!
p (3) .53 (1 .5)53
3!(5 3)!
.3125
Binomial Probability Table
(Portion)
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
Cumulative Probabilities
p(x ≤ 3) – p(x ≤ 2) = .812 – .500 = .312
Binomial Distribution
Characteristics
n = 5 p = 0.1
P(X)
Mean 1.0
E(x) np .5
.0 X
Standard Deviation 0 1 2 3 4 5
n = 5 p = 0.5
npq P(X)
.6
.4
.2
.0 X
0 1 2 3 4 5
Binomial Distribution
Thinking Challenge
You’re a telemarketer selling
service contracts for Macy’s.
You’ve sold 20 in your last 100
calls (p = .20). If you call 12
people tonight, what’s the
probability of
A. No sales?
B. Exactly 2 sales?
C. At most 2 sales?
D. At least 2 sales?
Binomial Distribution Solution*
n = 12, p = .20
A. p(0) = .0687
B. p(2) = .2835
C. p(at most 2) = p(0) + p(1) + p(2)
= .0687 + .2062 + .2835
= .5584
D. p(at least 2) = p(2) + p(3)...+ p(12)
= 1 – [p(0) + p(1)]
= 1 – .0687 – .2062
= .7251
4.4
= 6
P(X)
.3
Standard Deviation .2
.1
.0 X
Poisson Distribution Example
Customers arrive at a
rate of 72 per hour.
What is the probability
of 4 customers
arriving in 3 minutes?
© 1995 Corel Corp.
Poisson Distribution Solution
72 Per Hr. = 1.2 Per Min. = 3.6 Per 3 Min. Interval
e
x
p( x)
x!
3.6
4 3.6
e
p (4) .1912
4!
Poisson Probability Table
(Portion)
x
0 … 3 4 … 9
.02 .980 …
: : : : : : :
3.4 .033 … .558 .744 … .997
3.6 .027 … .515 .706 … .996
3.8 .022 … .473 .668 … .994
: : : : : : :
Cumulative Probabilities
p(x ≤ 4) – p(x ≤ 3) = .706 – .515 = .191
Thinking Challenge
You work in Quality
Assurance for an investment
firm. A clerk enters 75
words per minute with 6
errors per hour. What is the
probability of 0 errors in a
255-word bond transaction?
e
x
p( x)
x!
.34
0 .34
e
p (0) .7118
0!
Characteristics of a
Hypergeometric
Random Variable
1. The experiment consists of randomly drawing
n elements without replacement from a set of
N elements, r of which are S’s (for success)
and (N – r) of which are F’s (for failure).
2. The hypergeometric random variable x is the
number of S’s in the draw of n elements.
Hypergeometric Probability
Distribution Function
r N r
x n x
p x [x = Maximum [0, n – (N – r), …,
N Minimum (r, n)]
n
nr r N r n N n
µ
2
N N 2 N 1
where . . .
Hypergeometric Probability
Distribution Function
Mean
Median
Mode
Probability Density Function
2
1 x
1
2
f ( x) e
2
where
µ = Mean of the normal random variable
x
= Standard deviation
π = 3.1415 . . .
e = 2.71828 . . .
P(x < a) is obtained from a table of
normal
probabilities
Effect of Varying
Parameters ( & )
Normal Distribution
Probability
Probability is
d
area under
curve!
P(c x d)
c
f (x)dx ?
f(x)
x
c d
Standard Normal Distribution
The standard normal distribution is a normal
distribution with µ = 0 and = 1. A random
variable with a standard normal distribution,
denoted by the symbol z, is called a standard
normal random variable.
The Standard Normal Table:
P(0 < z < 1.96)
Standardized Normal
Probability Table (Portion)
Z .04 .05 .06 s=1
1.8 .4671 .4678 .4686
.4750
1.9 .4738 .4744 .4750
2.0 .4793 .4798 .4803
m= 0 1.96 z
2.1 .4838 .4842 .4846 Shaded area
Probabilities exaggerated
The Standard Normal Table:
P(–1.26 z 1.26)
.5000
P(z > 1.26)
.3962 = .5000 – .3962
= .1038
1.26 z
m=0
The Standard Normal Table:
P(–2.78 z –2.00)
Standardized Normal Distribution
s=1
.4973 P(–2.78 ≤ z ≤ –2.00)
= .4973 – .4772
.4772
= .0201
–2.78 –2.00 z
m=0
Shaded area exaggerated
The Standard Normal Table:
P(z > –2.13)
f(x)
x That’s an infinite
number of tables!
Converting a Normal Distribution to
a Standard Normal Distribution
x
z
Normal Standardized Normal
Distribution Distribution
s s=1
m x m= 0 z
One table!
Finding a Probability
Corresponding to a Normal
Random Variable
1. Sketch normal distribution, indicate mean, and shade
the area corresponding to the probability you want.
2. Convert the boundaries of the shaded area from x
values to standard normal random variable z
x µ
z
Show the z values under corresponding x values.
3. Use Table II in Appendix D to find the areas
corresponding to the z values. Use symmetry when
necessary.
Non-standard Normal μ = 5,
σ = 10: P(5 < x < 6.2)
x 6.2 5
z .12
Normal 10 Standardized Normal
Distribution Distribution
s = 10 s=1
.0478
m= 5 6.2 x m= 0 .12 z
Shaded area exaggerated
Non-standard Normal μ = 5,
σ = 10: P(3.8 x 5)
x 3.8 5
z .12
10
Normal Standardized Normal
Distribution Distribution
s = 10 s=1
.0478
3.8 m = 5 x -.12 m = 0 z
Shaded area exaggerated
Non-standard Normal μ = 5,
σ = 10: P(2.9 x 7.1)
x 2.9 5 x 7.1 5
z .21 z .21
10 10
Normal Standardized Normal
Distribution Distribution
s = 10 s=1
.1664
.0832 .0832
.1179
.0347
.0832
.4772
.0040 .4960
m=0 ?
.31 z 0.2 .0793 .0832 .0871
m = 5 8.1
? x m = 0 .31 z
x z 5 .3110
Shaded areas exaggerated
Normal Approximation of
Binomial Distribution
1. Useful because not all
binomial tables exist
2. Requires large sample n = 10 p = 0.50
size p(x)
.3
3. Gives approximate .2
probability only .1
.0 x
4. Need correction for 0 2 4 6 8 10
continuity
Why Probability
Is Approximate
Probability Added
p(x) by Normal Curve
.3
.2 Probability Lost by
Normal Curve
.1
.0 x
0 2 4 6 8 10
Binomial Probability: Normal Probability: Area Under
Bar Height Curve from 3.5 to 4.5
Correction for Continuity
z
a .5 µ
Using a Normal Distribution
to Approximate Binomial
Probabilities
4. Sketch the approximating normal distribution and
shade the area corresponding to the event of
interest. Using Table II and the z-value (step 3),
find the shaded area.
This is the approximate
probability of the
binomial event.
Normal Approximation
Example
What is the normal approximation of p(x = 4)
given n = 10, and p = 0.5?
P(x)
.3
.2
.1
.0 x
0 2 4 6 8 10
3.5 4.5
Normal Approximation
Solution
1. Calculate the interval:
np 3 np 1 p 10 0.5 3 10 0.5 1 0.5
5 4.74 0.26, 9.74
Interval lies in range 0 to 10, so normal
approximation can be used
z
a .5 n p
3.5 10 .5
0.95
n p 1 p 10 .5 1 .5
z
a .5 n p
4.5 10 .5
0.32
n p 1 p 10 .5 1 .5
Normal Approximation
Solution
4. Sketch the approximate normal distribution:
.3289 =0
- .1255 =1
.2034
.1255
.3289
-.95 -.32 z
Normal Approximation
Solution
5. The exact probability from the binomial formula is
0.2051 (versus .2034)
p(x)
.3
.2
.1
.0 x
0 2 4 6 8 10
4.7
IQR Q3 Q1
s s
Determining Whether the Data
Are from an Approximately
Normal Distribution
4. Examine a normal
probability plot for the
Expected z–score
data. If the data are
approximately
normal, the points will
fall (approximately)
on a straight line.
Observed value
Normal Probability Plot
Other Continuous
Distributions:
Uniform and Exponential
Uniform Distribution
Continuous random variables that appear to have
equally likely outcomes over their range of
possible values possess a uniform probability
distribution.
Suppose the
random variable x
can assume values
only in an interval c
≤ x ≤ d. Then the
uniform frequency
function has a
rectangular shape.
Probability Distribution for a
Uniform Random Variable x
1
Probability density function: f (x) cxd
dc
cd dc
Mean: Standard Deviation:
2 12
P a x b b a d c , c a b d
Uniform Distribution Example
You’re production manager of a soft
drink bottling company. You believe
that when a machine is set to
dispense 12 oz., it really dispenses
between 11.5 and 12.5 oz.
inclusive. Suppose the amount
dispensed has a uniform SODA
distribution. What is the probability
that less than 11.8 oz. is
dispensed?
Uniform Distribution Solution
f(x)
1 1 1.0
d c 12.5 11.5
1
1.0
1
x
11.5 11.8 12.5
Standard Deviation:
Finding the Area to the Right
of a Number a for an
Exponential Distribution
Exponential Distribution
Example
Suppose the length of time (in hours) between
emergency arrivals at a certain hospital is
modeled as an exponential distribution with = 2.
What is the probability that more than 5 hours
pass without an emergency arrival?
x
1
x 0
Mean: 2 f (x) e
Standard Deviation: 2
Exponential Distribution
Solution
Probability is the area A
to the right of a = 5.
a
52
A e e e2.5
Use stat software:
A e2.5 .082085
Continuous Distributions
1. P(x = a) = 0
2. P(a < x < b) = area under curve between a
and b
Key Ideas
x is binomial (n, p)
P x a P z a .5 µ
Key Ideas