4 Conditional Probability and Independence-Std

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

SB for Stst 2171-2021 4/8/2021

4. Conditional Probability and


Independence

4.1 Conditional probability


We know that two events are independent of one another if
the occurrence of first event in no way affects the outcome of the
second event. On the other hand, two events are said to be
dependent when the occurrence of the first event changes the
probability of the occurrence of the second event.
The conditional probability of an event B in relationship to an
event A is defined as the probability that event B occurs after
event A has already occurred.
• Conditional probability provides us with a way to reason about
the outcome of an experiment, based on partial information.
• If the occurrence of one event has an effect on the occurrence
of the other event then the two events are conditional or
dependent events.
• The conditional probability of an event is a probability
obtained with the additional information that some other
event has already occurred. 2

1
SB for Stst 2171-2021 4/8/2021

Conditional probability and ….


The conditional probability of an event A given that B has already occurred,
denoted by P(A|B) is

𝑃(𝐴∩𝐵)
𝑃 𝐴 𝐵 = , 𝑤ℎ𝑒𝑟𝑒 𝑃 𝐵 > 0
𝑃(𝐵)

The conditional probability of an event B in relationship to an event A is


defined as the probability that event B occurs after event A has already
occurred.

𝑃(𝐴∩𝐵)
𝑃 𝐵 𝐴 = , 𝑤ℎ𝑒𝑟𝑒 𝑃 𝐴 > 0
𝑃(𝐴)

The notation P(B|A) does not mean that B is divide by A; rather, it


means the probability that event B occurs given that event A has
already occurred. 3

Conditional …
Example 1
A box contains 80 candles, 30 of which are defective. Suppose we take two candles from this box in
sequence with and without replacement. Defining the two events as follows, find the probabilities
for the events under the two situations.

A={the first candle is defective} B={the second candle is defective}

a) with replacement
30 3
P(A)= =
80 8
30 3
P(B)= =
80 8

b) without replacement
30 3
P(A)= = P(B)=? This depends whether A did or did not occur.
80 8
30
If A did not occur, P(B)=
79

If A did occur, on the 2nd draw there are only 79 candles left of which 29 are defective.
29
Here P(B)= P(B/A)=
79

P(B|A) is the conditional probability of B given that A has already occurred.


4

2
SB for Stst 2171-2021 4/8/2021

Conditional probability …
Example 2
A box contains black balls and white balls. A person selects two balls
without replacement. If the probability of selecting a black ball
and a white ball is 15
56 , and the probability of selecting a black ball
on the first draw is 83, find the probability of selecting a white ball
on the second draw, given that the first ball selected was a black
ball.
Soln
Let B= selecting a black ball W= selecting a white ball
Given: P(B and W) =
15 P(B) = 3
56 8 P(A and B)
Then by the conditional probability relationship P(B|A )  P(A )
P(B and W) 15 56 15 3 15 8 5
P( W|B)       
P(B) 3 56 8 56 3 7
8
Five over seven is the probability of selecting a white ball on
the second draw given that the first ball selected was black. 5

Conditional probability …
Exercise 1
A random car is chosen among all those passing through the
gate of CNS on a certain day. The probability that the car is
yellow is 3/100: the probability that the driver is female is 1/5;
and the probability that the car is yellow and the driver is
female is 1/50. Find the probability that the driver is female
given that the car is yellow.

Soln
If A is the event ‘the car is yellow’ and B the event ‘the driver is female’,
then we are given that P(A) = 0.03, P(B) = 0.2, and P(A and B) = 0.02.

P(A and B) 0.02


P(B|A )  P(B|A)   0.667
P( A ) 0.03
6

3
SB for Stst 2171-2021 4/8/2021

Conditional probability …
Exercise 2
Suppose that an office has 100 calculating machines. Some of these machines are
electric (E) while others are manual (M). And some of the machines are new (N)
while others are used ( U). The following table gives the number of machines in
each category. A person enters the office, picks a machine at random and discovers
that it is new. What is the probability that it is electric?

E M

N 40 30 70
U 20 10 30

60 40 100
Soln

𝑃(𝐸 ∩ 𝑁) 40
𝑃 𝐸 𝑁 = = 100 = 4
𝑃(𝑁) 70 7
100

4.2 Multiplication, Bayes’ and total probability theorems

Multiplication theorem of probability


Definition: If A and B are two events in S and P(A) is not zero, then the
probability that A and B will both occur is the product of the probability
of A and the conditional probability of B given A.

That is,
𝑃 𝐴∩𝐵 =𝑃 𝐴 𝑃 𝐵 𝐴 .

Similarly,
𝑃 𝐴 ∩ 𝐵 = 𝑃 𝐵 𝑃 𝐴/𝐵

The multiplication rules can be used to find the probability of two or


more events that occur in sequence.
8

4
SB for Stst 2171-2021 4/8/2021

Multiplication …

Multiplication Rule 1
• When two events are independent, the probability of both
occurring is
P(A and B)= P(A)∙P(B)

Examples of independent events:


• Rolling a die and tossing a coin; and getting a tail on the coin and a 5 on the die
• Drawing a card twice from a deck with replacement and getting a 10
• Tossing a coin twice and getting two heads

Multiplication Rule 2
• When two events are dependent, the probability of both
occurring is
P(A and B)= P(A)∙P(B|A)
Examples of dependent events:
• Drawing a card from a deck, not replacing it, and then drawing a second card.
• Scoring excellent grades and winning a scholarship award.
• Cheating on exams and obtaining nil. 9

Multiplication…

The above multiplication rule can be generalized to more than


two events as shown below.

Let A1, A2, …, An be a sequence of events and assume

𝐴𝑖 ≠ 0
𝑖=1
then,

𝑃 𝐴𝑖 = 𝑃 𝐴1 𝑃 𝐴2 𝐴1 𝑃 𝐴3 𝐴1 , 𝐴2 … 𝑃(𝐴𝑛 𝐴1 , 𝐴2 … , , 𝐴𝑛−1 )
𝐼=1

10

5
SB for Stst 2171-2021 4/8/2021

Multiplication ….
Example 1
Suppose a card is drawn from a deck and not replaced, and
then a second card is drawn. What is the probability of selecting
an ace on the first card and a king on the second card?

Soln:
Let
A= Selecting an ace
B= Selecting a king
Are the two evets dependent or independent?
The event of getting a king on the second draw given that an ace was drawn the first time is called
a conditional probability.

𝑃 𝐴∩𝐵 =𝑃 𝐴 ×𝑃 𝐴 𝐵

52  51  16 2652  4 663
4 4
11

Multiplication …
Example
Three cards are drawn from an ordinary deck and not replaced. Find the
probability of the following events:
a) Getting 3 jacks
b) Getting an ace, a king and a queen in order
c) Getting a diamond, a spade and a heart in order
d) Getting 3 hearts
Soln : (dependent or independent?)
a) P (3 jacks)  4  3  2  24

1
52 51 50 132,600 5525
4 4 4 64 8
b) P(ace and king and queen )     
52 51 50 132,600 16,575

13 13 13 2197 169
c) P(diamond and spead and heart)     
52 51 50 132,600 10,200
13 12 11 1,716 11
d) P( 3 hearts)     
52 51 50 132,600 850 12

6
SB for Stst 2171-2021 4/8/2021

Multiplication …
Bayes’ Theorem
Given two dependent events A and B, the formulas for conditional probability allow
us to find P(A and B), or P(B/A). Related to these formulas is a rule developed by
Thomas Bayes (1702–1761). The rule is known as Bayes’ Theorem.
Let A and B be two events with their corresponding probabilities P(A) and P(B), then

𝑃(𝐴)
𝑃 𝐴 𝐵 = 𝑃(𝐵 𝐴)
𝑃(𝐵)
Bayes’Rule is based on the notion of a partition of a sample space. Events are said to
partition a sample space S if two conditions exist:
1) 𝑩𝒊 ∩ 𝑩𝒋 = ∅ for any pair i and j
2) 𝑩𝟏 ∪ 𝑩𝟐 ∪ 𝑩𝟑 ∪ ⋯ ∪ 𝑩𝒌 = 𝑺
Thus the events 𝑩𝟏 , 𝑩𝟐 , 𝑩𝟑 , … , 𝑩𝒌 are mutually exclusive and exhaustive.

This can be graphically


represented as
13

Multiplication …
Let A be some event associated with S and 𝑩𝟏 , 𝑩𝟐 , … , 𝑩𝒌 be
partitions of S. Hence we can write

𝐴 = 𝐴 ∩ 𝐵1 ∪ 𝐴 ∩ 𝐵2 ∪ … ∪ (𝐴 ∩ 𝐵𝑘 )

• Some of 𝐴 ∩ 𝐵𝑖 may be empty. Note that since B's are partitions and
have no intersections, all sets 𝐴 ∩ 𝐵1 , 𝐴 ∩ 𝐵2 , … , (𝐴 ∩ 𝐵𝑘 ) are
pair-wise mutually exclusive. Hence we may apply the addition
property for mutually exclusive events and write

P(A) =𝑃 𝐴 ∩ 𝐵1 + 𝑃 𝐴 ∩ 𝐵2 + ⋯ 𝑃(𝐴 ∩ 𝐵𝑘 ).

• We know that by conditional probability, the term 𝑃 𝐴 ∩ 𝐵𝑖 for each i


can be expressed as 𝑃 𝐴 ∕ 𝐵𝑖 𝑃 𝐵𝑖 and hence we obtain what is
called the theorem on total probability:
14

7
SB for Stst 2171-2021 4/8/2021

Multiplication …
Total Probability Theorem
If we have 𝑩𝟏 , 𝑩𝟐 , … , 𝑩𝒌 as partitions of S for any event A
associated with S,
𝑃 𝐴 = 𝑃 𝐴 𝐵1 𝑃 𝐵1 + 𝑃 𝐴 𝐵2 𝑃 𝐵2 + … + 𝑃 𝐴 𝐵𝑘 𝑃 𝐵𝑘

= 𝑃 𝐴 𝐵𝑖 𝑃(𝐵𝑖 )
𝑖=1

This can be represented graphically as follows:

15

Multiplication …
Example 1
Suppose a statistics class contains 60% girls and 40% boys. Suppose that 30% of the
girls and 20% of the boys scored A in the final exam. A student is chosen at random
from the class. What is the probability that the chosen student will have an A grade?

To answer this, we let


A be the set of all students who scored A grade
B1 be the set of girls
B2 be the set of boys.

Then {B1, B2} is a partition of the class.

Given: P(B1)= 0.6 P(B2) =0.4


P(A/B1)=0.3 P(A/B2)=0.2

We are interested in P(A). We compute this by the total probability theorem as


P(A) = P(B1)P(A| B1) + P(B2)P(A| B2)
= (0.6)(0.3) + (0.4)(0.2) = 0.26,

so there is a 26% chance that the randomly chosen student has scored an A grade.
16

8
SB for Stst 2171-2021 4/8/2021

Multiplication …
Exercise 1
A company buys chairs from two suppliers, 1 and 2. Supplier 1 has a
record of delivering chairs containing 10% defectives, whereas supplier 2
has a defective rate of only 5%. Suppose 40% of the current supply came
from supplier 1. If a chair is selected randomly from this supply, what is
the probability of the chair to be defective?

Soln
Let,
A be the set of all defective chairs.
B1 be the set of chairs from supplier 1
B2 be the set of chairs from supplier 2.

Then {B1, B2} is a partition of the supplies.

17

Multiplication …
Thinking about the previous exercise (Exercise 1), we may
want to get another important result. Suppose one chair is
chosen and is found to be defective. What is the probability
that it is from Supplier 1? The Bayes’ Theorem which has
been discussed previously can be used to answer this
question.

Bayes’ Theorem

Let B1, B2, …., Bk be a partition of the sample space S and


let A be an event associated with S. Then

𝑃 𝐴 𝐵𝑖 𝑃(𝐵𝑖 )
𝑃 𝐵𝑖 𝐴 = 𝑘
𝐽=1 𝑃 𝐴 𝐵𝑗 𝑃(𝐵𝑗 ) 18

9
SB for Stst 2171-2021 4/8/2021

Multiplication …
Example 2
Take the two suppliers information in Exercise 1. If a chair is
selected randomly from this supply and observed to be defective,
find the probability that it came from supplier 1.

Let Bi denote the event that a chair comes from supplier i (i = 1,2), and
note that B1 and B2 form a partition of the sample space for the
experiment of selecting one chair. Let A denote the event that the selected
chair is defective. Then
𝑃 𝐵1 𝑃(𝐴 𝐵1 )
𝑃 𝐵1 𝐴 =
𝑃 𝐵1 𝑃 𝐴 𝐵1 + 𝑃 𝐵2 𝑃(𝐴 𝐵2 )

0.40×0.10
=
0.40×0.10 +(0.60×0.05)

= 0.5714
Supplier 1 has a greater probability of being the party supplying the defective chair
than does supplier 2.
19

Multiplication …
Exercise 2
Consider the statistic class students’ information in Example 1.
It was observed that a randomly selected student has an A
grade. What is the probability that the chosen student is a girl?

Soln
We found out that a randomly selected student has scored A.
Our interest is to quantify the chance of occurrence that the
selected student is a girl.

Let Bi denote the event that a student belongs to one of the


sexes (M,F) in the class, and note that B1 and B2 form a
partition of the sample space for the experiment of selecting a
student. Let A denote the event that the selected student’s
grade is A. Then ----

20

10
SB for Stst 2171-2021 4/8/2021

4.3 Independent events

Independence: Two events A and B are independent events if


the occurrence of A does not affect the probability of B occurring.

Example 1: A coin is flipped and a die is rolled. Find the probability


of getting a head on the coin and a 4 on the die.

Soln : (dependent or independent?)

• P(A and B)= P(A)∙P(B).


• P(head and 4)= 1  1  1
2 6 12

Using the sample space:


• H1 H2 H3 H4 H5 H6 T1 T2 T3 T4 T5 T6.
• There is only one way to get the head-4 outcome. The solution
is, therefore, 1 .
12 21

… independence
Example 2: If a coin is tossed twice, what is the probability of getting
two heads? (dependent or independent?)
2 2  4
1 1 1
P(HH)=
1
Using the sample space HH,HT,TH,TT. Then P(HH)= 4

Example 3: A card is drawn from a deck and replaced; then a second


card is drawn. Find the probability of getting a queen and then an ace.
(dependent or independent?)

Solution
4
The probability of getting a queen is 52 ,
since the card is replaced, the probability of getting an ace is 4
52
Hence, the probability of getting a queen and an ace is
4 4 16 1
P(queen and ace)  P(queen )  P(ace)  52
 52  2704
 169
22

11

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy