Lecture 7
Lecture 7
Dr. A. Ramesh
Department of Management Studies
1
Problem
• A company data reveal that 155 employees worked one of four types of
positions.
• Shown here again is the raw values matrix (also called a contingency table)
with the frequency counts for each category and for subtotals and totals
containing a breakdown of these employees by type of position and by
sex.
2
Contingency Table
3
Solution
4
Problem
• Shown here are the raw values matrix and corresponding probability
matrix for the results of a national survey of 200 executives who were
asked to identify the geographic locale of their company and their
company’s industry type.
• The executives were only allowed to select one locale and one industry
type.
5
6
Questions
a. What is the probability that the respondent is from the Midwest (F)?
c. What is the probability that the respondent is from the Southeast (E) or
from the finance industry (A)?
7
8
Mutually Exclusive Events
Type of Gender
Position Male Female Total
Managerial 8 3 11
Professional 31 13 44
Technical 52 17 69
Clerical 9 22 31
Total 100 55 155
P(T C ) P(T ) P(C )
69 31
155 155
.645
9
Mutually Exclusive Events
Type of Gender
Position Male Female Total
Managerial 8 3 11
Professional 31 13 44
Technical 52 17 69
Clerical 9 22 31
Total 100 55 155
P( P C ) P( P) P(C )
44 31
155 155
.484
10
Law of Multiplication
P( X Y ) P( X ) P( Y | X ) P( Y ) P( X | Y )
11
Problem
12
Married
Y N Sub total
Supervisor Y 0.1143 30
N 110
Sub 80 60 140
total
13
80
P( M ) 0. 5714
140
P( S| M ) 0. 20
P ( M S ) P ( M ) P ( S| M )
( 0. 5714 )( 0. 20 ) 0.1143
14
Law of Multiplication
P( S ) 1 P( S )
Probability Matrix 1 0. 2143 0. 7857
of Employees P( M S ) P( S ) P( M S )
Married 0. 7857 0. 4571 0. 3286
Supervisor Yes No Total P( M S ) P( M ) P( M S )
Yes .1143 .1000 .2143 0. 5714 0.1143 0. 4571
No .4571 .3286 .7857 P( M S ) P( S ) P( M S )
Total .5714 .4286 1.00 0. 2143 0.1143 0.1000
P( M ) 1 P( M )
1 0. 5714 0. 4286
15
Special Law of Multiplication for Independent Events
• General Law
P( X Y ) P( X ) P(Y | X ) P(Y ) P( X | Y )
• Special Law
If events X and Y are independent,
P( X ) P( X | Y ), and P (Y ) P (Y | X ).
Consequently,
P( X Y ) P( X ) P(Y )
16
Law of Conditional Probability
P( X Y ) P( Y | X ) P( X )
P( X | Y )
P( Y ) P( Y )
17
Conditional Probability
• A conditional probability is the probability of one event, given that
another event has occurred:
P(A and B) The conditional
P(A | B) probability of A given
P(B) that B has occurred
P(A and B) The conditional
P(B | A)
P(A) probability of B given
that A has occurred
Where P(A and B) = joint probability of A and B
P(A) = marginal probability of A
P(B) = marginal probability of B
18
Computing Conditional Probability
• Of the cars on a used car lot, 70% have air conditioning (AC)
and 40% have a CD player (CD). 20% of the cars have both.
• What is the probability that a car has a CD player, given that it
has AC ?
• We want to find P(CD | AC).
Computing Conditional Probability
CD No CD Total
Given AC, we only consider the top row (70% of the cars). Of
these, 20% have a CD player. 20% of 70% is about 28.57%.
Computing Conditional Probability: Decision Trees
.2
.7
Given AC or P(AC and CD) = .2
no AC:
.5
P(AC and CD/) = .5
.7
All
Cars .2
.3
P(AC/ and CD) = .2
• If X and Y are independent events, the occurrence of Y does not affect the
probability of X occurring.
• If X and Y are independent events, the occurrence of X does not affect the
probability of Y occurring.
P(A | B) P(A)
P( A G) 0.07
P( A| G) 0.33 P( A) 0.28
P(G ) 0.21
P( A| G) 0.33 P( A) 0.28
Independent Events
D E
A 8 12 20 8
P( A| D) .2353
34
B 20 30 50
20
P ( A) .2353
C 6 9 15 85
P( A| D) P( A) 0.2353
34 51 85
Revision of Probabilities: Bayes’ Rule
P(Y | Xi ) P( Xi )
P( Xi| Y )
P(Y | X 1) P( X 1) P(Y | X 2 ) P( X 2 ) P(Y | Xn ) P( Xn )
28
29
30
31
Problem
• A particular type of printer ribbon is produced by only
two companies, Alamo Ribbon Company and South
Jersey Products.
• Suppose Alamo produces 65% of the ribbons and
that South Jersey produces 35%.
• Eight percent of the ribbons produced by Alamo are
defective and 12% of the South Jersey ribbons are
defective
• A customer purchases a new ribbon. What is the
probability that Alamo produced the ribbon? What is
the probability that South Jersey produced the
ribbon?
Revision of Probabilities
with Bayes' Rule: Ribbon Problem
P( Alamo) 0. 65
P( SouthJersey) 0. 35
P( d | Alamo) 0. 08
P( d | SouthJersey) 0.12
P( d | Alamo) P( Alamo)
P( Alamo| d )
P( d | Alamo) P( Alamo) P( d | SouthJersey) P( SouthJersey)
( 0. 08)( 0. 65)
0. 553
( 0. 08)( 0. 65) ( 0.12 )( 0. 35)
P( d | SouthJersey) P( SouthJersey)
P( SouthJersey| d )
P( d | Alamo) P( Alamo) P( d | SouthJersey) P( SouthJersey)
( 0.12 )( 0. 35)
0. 447
( 0. 08)( 0. 65) ( 0.12 )( 0. 35)
Revision of Probabilities with Bayes’ Rule: Ribbon Problem
Revision of Probabilities
with Bayes' Rule: Ribbon Problem
Defective
0.08 0.052
Alamo
0.65
Acceptable + 0.094
0.92
Defective 0.042
0.12
South
Jersey
0.35 Acceptable
0.88
THANK YOU
36