You are on page 1of 6

Today’s topics: Chapter 10.

Probability

(1) Marginal Probability

(2) Conditional Probability and Independence


Lec 9—Chapter 10
(3) Law of Total Probability
Yijun Lou
(4) Bayes’ Theorem
November 7, 2016
(5) Probability Distributions

(6) Mean and Variance

2/21

Solution: Let events: A=having checking account;


B=having saving account. Then A fi B=having checking
Example: The probability of a person having a check- or saving account; and A fi B=having neither account.
ing account is 0.74, a saving account of is 0.31, having
neither account is 0.2. Find the probabilities that (a) probability of having both account=P (A fl B). Since
P (A fi B)=1 ≠ P (A fi B)=0.8 (complement rule), by
(a) having both accounts; the addition rule,

(b) having exactly one type of accounts. P (A fl B) = P (A) + P (B) ≠ P (A fi B)


= 0.74 + 0.31 ≠ 0.8 = 0.25

(b) probability of having exactly one type of account=only


having checking account + only having saving account

[P (A) ≠ P (A fl B)] + [P (B) ≠ P (A fl B)] = 0.55

3/21 4/21
Example: All 420 employees of a company
Marginal Probability were asked if they are smokers or nonsmokers
and whether or not they are university graduates.
University Not a University
graduate graduate Total
Definition: Marginal (or simple) probability is the Smoker 35 80 115
probability of a single event without consideration of Nonsmoker 130 175 305
any other event. Total 165 255 420
If one employee is selected at random from this
company, find the probability that this employee is
(a) a university graduate; (b) a nonsmoker; (c) a
university graduate and smoker; and (d) a university
graduate or a nonsmoker.

5/21 6/21

Solution: Let U–University graduate; N–Nonsmoker,


then
Conditional Probability and Independence
165 11
(a) P (U ) = = = 0.3929;
420 28
305 61
(b) P (N ) = = = 0.7262; Definition: The probability of an event A, given that
420 84
an event B has occurred, is called the conditional
1 ‹ 2 35 1 probability of A given B and denoted by
(c) P U N = = ;
420 12
P (A|B).
(d)

P (U N)

= P (U ) + P (N ) ≠ P (U N )
165 305 130 17
= + ≠ = = 0.8095
420 420 420 21

7/21 8/21
Theorem: If A and B are two events with P (A) ”= 0
and P (B) ”= 0, then Example: A box contains 100 DVDs manufactured on
2 machines:
P (A fl B)
P (A|B) = . Defective Good Total
P (B)
Machine A 9 51 60
Machine B 6 34 40
Total 15 85 100

Suppose a DVD is randomly chosen and denote the


following event: D–DVD is defective; G–DVD is good;
A–DVD was made by machine A; and B–DVD is made
Remark: By this theorem, the conditional probability
P (A fl B) by machine B. Evaluate P (D), P (A fl D), P (A|D)
P (B|A) = . If P (A) ”= P (B), then and P (D|A).
P (A)

P (A|B) ”= P (B|A)

9/21 10/21

Revise the DVD example into following one:


Definition: Two events A and B are said to be inde-
pendent if the occurrence of one does not affect the
probability of the occurrence of the other, that is, Example: A box contains 100 DVDs manufactured on
2 machines:
P (A|B) = P (A).
Defective Good Total
Machine A 10 50 60
Revisit the DVD example in the previous page, we Machine B 6 34 40
can see that the P (D)=P (D|A)=0.15, therefore, two Total 16 84 100
events D and A are independent Suppose a DVD is randomly chosen and denote the fol-
lowing event: D–DVD is defective; A–DVD was made
by machine A. Are two events D and A independent?

11/21 12/21
Theorem: The probability that both of the two events
A and B occur is
Example: Suppose that a box contains 8 red balls and
P (A fl B) = P (A)P (B|A) = P (B)P (A|B) . 4 white balls. We draw 2 balls from the box without
replacement. If we assume that at each draw each
ball in the box is equally likely to be chosen, what is
Theorem: If two events A and B are independent,
the probability that both drawn balls are red?
then
P (A fl B) = P (A) P (B).

Remark: If P (A|B) = P (A), then we also have

P (B|A) = P (B)

13/21 14/21

Solution: Let R1 and R2 be the events that the first and


Law of Total Probability
second ball drawn is red. Given that the first ball selected
is red, there are 7 remaining red balls and 4 white balls,
7 8
and so P (R2 |R1 ) = . As P (R1 ) is clearly , then
11 12 Suppose B1 , B2 , B3 are collectively exhaustive and mu-
3
8
43
7
4
14 tually exclusive events, then for any event A:
P (R1 fl R2 ) = P (R1 )P (R2 |R1 ) = =
12 11 33
P (A) = P (B1 fl A) + P (B2 fl A) + P (B3 fl A)
= P (B1 )P (A|B1 ) + P (B2 )P (A|B2 )
Remark: We can also compute by using this way +P (B3 )P (A|B3 ) .
! 8"
2 14
P (R1 fl R2 ) = !12 " = .
2
33

15/21 16/21
Example: In a college, the number of junior students
is five times of the number of senior students. The
Theorem (Law of total probability): Assume that B1 ,
probability that a senior student will be taking com-
B2 , . . ., Bn is a collection of events with
puter science is 0.20 and the probability that a junior
(a) P (Bi ) > 0 for all i; student will be taking computer science is 0.30. If
u a student is selected randomly, find the probability
(b) P (Bi Bj ) = 0 whenever i ”= j; that: (a) he/she is a senior computer science student?
t t t (b) he/she is a computer science major student? (c)
(c) B1 B2 ··· Bn = S
he/she is a junior given that he/she is a computer
Then for any event A, science student?

P (A) = P (B1 ) P (A|B1 ) + P (B2 ) P (A|B2 ) Solution: Let A = the selected student is a senior
+ · · · + P (Bn ) P (A|Bn ) . B = the selected student is a junior

C = the selected student is a computer science student.

P (C|A) = 0.20, P (C|B) = 0.30,


5
P (A) = 16 , P (B) = .
6

17/21 18/21

By the multiplicative rule,


1
P (A fl C) = P (A) P (C|A) = ◊ 0.20 = 0.03333. Bayes’ Theorem
6
By the law of total probability, we get

P (C) = P (A fl C) + P (B fl C) Theorem (Bayes’ Theorem) Suppose that B1 , B2 , . . .,


Bn are n mutually exclusive and exhaustive events,
= P (A) P (C|A) + P (B) P (C|B)
then P (Bk |A) =
1 5
= ◊ 0.20 + ◊ 0.30 = 0.2833.
6 6 P (Bk )P (A|Bk )
.
P (B1 )P (A|B1 ) + P (B2 )P (A|B2 ) + · · · + P (Bn )P (A|Bn )
By the conditional probability definition,

P (B fl C)
P (B|C) =
P (C)
P (B) P (C|B)
=
P (C)
5
6 ◊ 0.30 15
= 1 5 = .
6 ◊ 0.20 + 6 ◊ 0.30 17

19/21 20/21
Example: Calculate P (B|T ) and P (B|T ) given that

P (T |B) = 0.99, P (T |B) = 0.05, P (B) = 0.02.

Solution:
P (B)P (T |B)
P (B|T ) =
P (B)P (T |B) + P (B)P (T |B)
0.02 ú 0.99
=
0.02 ú 0.99 + 0.98 ú 0.05
= 0.2878;
P (B)P (T |B)
P (B|T ) =
P (B)P (T |B) + P (B)P (T |B)
0.02 ú 0.01
=
0.02 ú 0.01 + 0.98 ú 0.95
= 0.00021.

21/21

You might also like