Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Conditional Probability Multiplication and Total Probability Rules Bayes' Theorem Independence

Chapter 1
Part II: Conditional Probability and Independence

Dr. Cao Van Kien

vankien.tt@gmail.com

January 6, 2021

Dr. Cao Van Kien Chapter 1: Conditional Probability and Independence January 6, 2021 1 / 17
Conditional Probability Multiplication and Total Probability Rules Bayes' Theorem Independence

Outline

1 Conditional Probability

2 Multiplication and Total Probability Rules

3 Bayes' Theorem

4 Independence

Dr. Cao Van Kien Chapter 1: Conditional Probability and Independence January 6, 2021 2 / 17
Conditional Probability Multiplication and Total Probability Rules Bayes' Theorem Independence

Consider the following problem.

Example (Toss two fair dice). The sample space is

S = {(i, j)|1 ≤ i, j ≤ 6} =⇒ |S| = 36.

Let

B = {Sum equals 10}

= {(4, 6), (5, 5), (6, 4)} =⇒ |B| = 3.

Find P (B).

Answer.
|B| 3 1
P (B) = = = .
|S| 36 12

Dr. Cao Van Kien Chapter 1: Conditional Probability and Independence January 6, 2021 3 / 17
Conditional Probability Multiplication and Total Probability Rules Bayes' Theorem Independence

Consider the following problem.

Example (Toss two fair dice). The sample space is

S = {(i, j)|1 ≤ i, j ≤ 6} =⇒ |S| = 36.

Let

B = {Sum equals 10}

= {(4, 6), (5, 5), (6, 4)} =⇒ |B| = 3.

Find P (B).

Answer.
|B| 3 1
P (B) = = = .
|S| 36 12

Dr. Cao Van Kien Chapter 1: Conditional Probability and Independence January 6, 2021 3 / 17
Conditional Probability Multiplication and Total Probability Rules Bayes' Theorem Independence

Example (Continuation of the previous question). What if we are given that the
two numbers are identical (event A)?

Dr. Cao Van Kien Chapter 1: Conditional Probability and Independence January 6, 2021 4 / 17
Conditional Probability Multiplication and Total Probability Rules Bayes' Theorem Independence

Conditional Probability (x¡c su§t câ i·u ki»n)

A conditional probability is the probability that an event will occur, when another
event is known to occur or to have occurred.

Definition
Suppose A, B ⊆ S and P (A) > 0. The conditional probability of B given A
(which has occurred) is defined as

P (A ∩ B)
P (B|A) =
P (A)

Dr. Cao Van Kien Chapter 1: Conditional Probability and Independence January 6, 2021 5 / 17
Conditional Probability Multiplication and Total Probability Rules Bayes' Theorem Independence

Conditional Probability

Example: Consider the previous question again where the experiment was tossing
two fair dice and we let A = {Two identical numbers} and B = {Sum = 10}. We
already know that P (B|A) = 61 . Find also P (A|B). Are they equal to each other?

Dr. Cao Van Kien Chapter 1: Conditional Probability and Independence January 6, 2021 6 / 17
Conditional Probability Multiplication and Total Probability Rules Bayes' Theorem Independence

Multiplication Rule (quy t­c nh¥n)

Rewriting the equation in the definition of conditional probability leads to a rule for
computing the probability of several events occurring together.

Theorem
For any two events A, B ⊆ S with P (A) > 0,

P (A ∩ B) = P (B|A) · P (A) = P (A|B) · P (B)

Example: Toss two fair dice. Find the probability that both dice will have 6-dot
face.

Answer. Let A be the event that both dice will have 6-dot face.

Let Ai be the event of the ith dice with 6 dots (i = 1, 2).

One has: A = A1 ∩ A2 . Furthermore, A1 and A2 are independent, so

1 1 1
P (A) = P (A1 ∩ A2 ) = P (A1 |A2 )P (A2 ) = P (A1 )P (A2 ) = × = .
6 6 36
Dr. Cao Van Kien Chapter 1: Conditional Probability and Independence January 6, 2021 7 / 17
Conditional Probability Multiplication and Total Probability Rules Bayes' Theorem Independence

Multiplication Rule (quy t­c nh¥n)

Rewriting the equation in the definition of conditional probability leads to a rule for
computing the probability of several events occurring together.

Theorem
For any two events A, B ⊆ S with P (A) > 0,

P (A ∩ B) = P (B|A) · P (A) = P (A|B) · P (B)

Example: Toss two fair dice. Find the probability that both dice will have 6-dot
face.

Answer. Let A be the event that both dice will have 6-dot face.

Let Ai be the event of the ith dice with 6 dots (i = 1, 2).

One has: A = A1 ∩ A2 . Furthermore, A1 and A2 are independent, so

1 1 1
P (A) = P (A1 ∩ A2 ) = P (A1 |A2 )P (A2 ) = P (A1 )P (A2 ) = × = .
6 6 36
Dr. Cao Van Kien Chapter 1: Conditional Probability and Independence January 6, 2021 7 / 17
Conditional Probability Multiplication and Total Probability Rules Bayes' Theorem Independence

Multiplication Rule (quy t­c nh¥n)

Rewriting the equation in the definition of conditional probability leads to a rule for
computing the probability of several events occurring together.

Theorem
For any two events A, B ⊆ S with P (A) > 0,

P (A ∩ B) = P (B|A) · P (A) = P (A|B) · P (B)

Example: Toss two fair dice. Find the probability that both dice will have 6-dot
face.

Answer. Let A be the event that both dice will have 6-dot face.

Let Ai be the event of the ith dice with 6 dots (i = 1, 2).

One has: A = A1 ∩ A2 . Furthermore, A1 and A2 are independent, so

1 1 1
P (A) = P (A1 ∩ A2 ) = P (A1 |A2 )P (A2 ) = P (A1 )P (A2 ) = × = .
6 6 36
Dr. Cao Van Kien Chapter 1: Conditional Probability and Independence January 6, 2021 7 / 17
Conditional Probability Multiplication and Total Probability Rules Bayes' Theorem Independence

Partition of a sample space (ph¥n ho¤ch cõa mæt khæng gian m¨u)

Definition
A finite or infinite sequence of nonempty events {Ei } are said to form a partition
(ph¥n ho¤ch) of the sample space S if they are
• both mutually exclusive (xung kh­c):

Ei ∩ Ej = ∅ for all i 6= j,

• and exhaustive (¦y õ):


[
Ei = S.

Dr. Cao Van Kien Chapter 1: Conditional Probability and Independence January 6, 2021 8 / 17
Conditional Probability Multiplication and Total Probability Rules Bayes' Theorem Independence

Partition of a sample space

Example: (Toss a die once). The sample space is S = {1, 2, 3, 4, 5, 6}.

Which of the following are partitions of the sample space?

• E1 = {1} , . . . , E6 = {6}
• A = {1, 3, 5} , Ac = {2, 4, 6}
• A = {1, 2, 3} , B = {4, 5} , C = {6}
• A = {1, 3, 5} , B = {2, 4}
• A = {1, 3, 5} , B = {2, 4} , C = {5, 6}

Dr. Cao Van Kien Chapter 1: Conditional Probability and Independence January 6, 2021 9 / 17
Conditional Probability Multiplication and Total Probability Rules Bayes' Theorem Independence

Total probability Rule (quy t­c têng x¡c su§t)

Theorem
Assume a partition of a sample space S = E1 ∪ E2 ∪ . . .. For any event A ⊆ S ,
we have X X
P (A) = P (A ∩ Ei ) = P (A|Ei )P (Ei ).
i i

Dr. Cao Van Kien Chapter 1: Conditional Probability and Independence January 6, 2021 10 / 17
Conditional Probability Multiplication and Total Probability Rules Bayes' Theorem Independence

Total probability Rule


Example: A manufacturer has two production lines I and II, line I produces 60% of the
manufacturer's product, line II produces 40% of the manufacturer's product. Know that
the rate of the failure product in line I is 1.5% and the rate of the failure product in line II
is 2%. The manufacturer's products after production are mixed together. Randomly select
a product from the manufacturer, and find the probability of getting a qualifying product.
Answer. Call
• E1 = (get the product produced by line I)
• E2 = (get the product produced by line II)
• A = (get the qualifying product from the manufacturer)
=⇒ Ac = (get the failure product from the manufacturer)

According to the assumption:


P (E1 ) = 0.6 P (E2 ) = 0.4
P (Ac |E1 ) = 0.015; P (Ac |E2 ) = 0.02
⇒ P (A|E1 ) = 0.985; P (A|E2 ) = 0.98
Applying the law of total probability, we have
P (A) = P (A|E1 )P (E1 ) + P (A|E2 )P (E2 ) = 0.985 · 0.6 + 0.98 · 0.4 = 0.983

Dr. Cao Van Kien Chapter 1: Conditional Probability and Independence January 6, 2021 11 / 17
Conditional Probability Multiplication and Total Probability Rules Bayes' Theorem Independence

Total probability Rule


Example: A manufacturer has two production lines I and II, line I produces 60% of the
manufacturer's product, line II produces 40% of the manufacturer's product. Know that
the rate of the failure product in line I is 1.5% and the rate of the failure product in line II
is 2%. The manufacturer's products after production are mixed together. Randomly select
a product from the manufacturer, and find the probability of getting a qualifying product.
Answer. Call
• E1 = (get the product produced by line I)
• E2 = (get the product produced by line II)
• A = (get the qualifying product from the manufacturer)
=⇒ Ac = (get the failure product from the manufacturer)

According to the assumption:


P (E1 ) = 0.6 P (E2 ) = 0.4
P (Ac |E1 ) = 0.015; P (Ac |E2 ) = 0.02
⇒ P (A|E1 ) = 0.985; P (A|E2 ) = 0.98
Applying the law of total probability, we have
P (A) = P (A|E1 )P (E1 ) + P (A|E2 )P (E2 ) = 0.985 · 0.6 + 0.98 · 0.4 = 0.983

Dr. Cao Van Kien Chapter 1: Conditional Probability and Independence January 6, 2021 11 / 17
Conditional Probability Multiplication and Total Probability Rules Bayes' Theorem Independence

Total probability Rule


Example: A manufacturer has two production lines I and II, line I produces 60% of the
manufacturer's product, line II produces 40% of the manufacturer's product. Know that
the rate of the failure product in line I is 1.5% and the rate of the failure product in line II
is 2%. The manufacturer's products after production are mixed together. Randomly select
a product from the manufacturer, and find the probability of getting a qualifying product.
Answer. Call
• E1 = (get the product produced by line I)
• E2 = (get the product produced by line II)
• A = (get the qualifying product from the manufacturer)
=⇒ Ac = (get the failure product from the manufacturer)

According to the assumption:


P (E1 ) = 0.6 P (E2 ) = 0.4
P (Ac |E1 ) = 0.015; P (Ac |E2 ) = 0.02
⇒ P (A|E1 ) = 0.985; P (A|E2 ) = 0.98
Applying the law of total probability, we have
P (A) = P (A|E1 )P (E1 ) + P (A|E2 )P (E2 ) = 0.985 · 0.6 + 0.98 · 0.4 = 0.983

Dr. Cao Van Kien Chapter 1: Conditional Probability and Independence January 6, 2021 11 / 17
Conditional Probability Multiplication and Total Probability Rules Bayes' Theorem Independence

Bayes' theorem (ành lþ Bayes)

... is a formula for computing the posterior probabilities" P (Ei |A).

Theorem
Suppose that the events E1 , E2 , . . . form a partition of S . Let A ⊆ S be any event
with P (A) > 0. Then, for any i,

P (A ∩ Ei ) P (A|Ei )P (Ei )
P (Ei |A) = =P
P (A) j P (A|Ej )P (Ej )

Dr. Cao Van Kien Chapter 1: Conditional Probability and Independence January 6, 2021 12 / 17
Conditional Probability Multiplication and Total Probability Rules Bayes' Theorem Independence

Example: A manufacturer has two production lines I and II, line I produces 60%
of the manufacturer's product, line II produces 40% of the manufacturer's product.
Know that the rate of the failure product in line I is 1.5% and the rate of the failure
product in line II is 2%. The manufacturer's products after production are mixed
together. Taking a product from the manufacturer at random, it is found that the
product is "a qualifying product", calculate the probability that that product is
produced by line I.

Answer.
P (A|E1 )P (E1 ) 0.985 · 0.6
P (E1 |A) = = = 0.601.
P (A) 0.983

Dr. Cao Van Kien Chapter 1: Conditional Probability and Independence January 6, 2021 13 / 17
Conditional Probability Multiplication and Total Probability Rules Bayes' Theorem Independence

Independence (ëc lªp)

Two events are independent if the knowledge of one event occurring does not
change the probability of the other occurring.

Definition
Two events A, B ⊆ S with P (A) > 0 are said to be independent if any one of the
following equivalent statements is true:
1 P (A|B) = P (A)

2 P (B|A) = P (B)

3 P (A ∩ B) = P (A)P (B).

Dr. Cao Van Kien Chapter 1: Conditional Probability and Independence January 6, 2021 14 / 17
Conditional Probability Multiplication and Total Probability Rules Bayes' Theorem Independence

Independence

Example: A card is selected at random from an ordinary deck of 52. Let A denote
the event that the selected card is an ace (qu¥n ¡t), and B a spade (con b½ch). Are
A, B independent?

Dr. Cao Van Kien Chapter 1: Conditional Probability and Independence January 6, 2021 15 / 17
Conditional Probability Multiplication and Total Probability Rules Bayes' Theorem Independence

Independence

Example: A day's production of 850 manufactured parts contains 50 parts that do


not meet customer requirements. Two parts are selected at random, without re-
placement, from the batch. Let A denoted the event that the first part is defective,
and B denote the event that the second part is defective. Are these two events not
independent of each other?

Answer.

49
First, we have P (B|A) = 849 . Now, what is P (B)?

P (B) = P (B|A)P (A) + P (B|A)P (A)


= (49/849)(50/850) + (50/849)(800/850)
= 50/850

Because P (B|A) does not equal P (B), the two events are not independent.

Dr. Cao Van Kien Chapter 1: Conditional Probability and Independence January 6, 2021 16 / 17
Conditional Probability Multiplication and Total Probability Rules Bayes' Theorem Independence

Independence

Example: A day's production of 850 manufactured parts contains 50 parts that do


not meet customer requirements. Two parts are selected at random, without re-
placement, from the batch. Let A denoted the event that the first part is defective,
and B denote the event that the second part is defective. Are these two events not
independent of each other?

Answer.

49
First, we have P (B|A) = 849 . Now, what is P (B)?

P (B) = P (B|A)P (A) + P (B|A)P (A)


= (49/849)(50/850) + (50/849)(800/850)
= 50/850

Because P (B|A) does not equal P (B), the two events are not independent.

Dr. Cao Van Kien Chapter 1: Conditional Probability and Independence January 6, 2021 16 / 17
Thank you very much for your attention!

You might also like