Conditional Probability Ex: Consider the following events: (i) C = {the

Conditional Probability
Ex: Consider the following events:
(i) C = {the sky above Dallas on a randomly picked day is cloudy}.
Roughly, P(C) = ____.
(ii) R = {it is raining in Dallas}.
What is P(C|R) (read as conditional probability of C given that R has already occurred)?
Moral: Knowing that “the event R has occurred” affected the probability assigned to C.
How to compute P(A|B)?
•
•
Hint: Think of P(A) as P(A|S) so that P(A) =
After conditioning on B, take B as the new sample space for computing P(A|B).
Hence:
Product rule:
In general, P(A|B) ___ P(B|A).
Ex: A box contains 5000 chips, 1000 of which are manufactured by company X and the rest by company
Y. Suppose that 15% of the chips made by X are defective and 5% of the chips made by Y are defective.
A chip is randomly drawn from the box.
(a) What is the probability that the chip is defective?
(b) What is the probability that the chip came from company X?
(c) Suppose the chosen chip is found to be defective. What is the probability that it came from X?
1
Independence
Events A and B are said to be independent if P(A|B) = P(A), i.e., the fact that B occurs does not affect the
probability of A.
Then:
The events are said to be dependent if they are not independent.
Ex: There are 5 blue balls and 7 red balls in a box.
(a) We randomly pick two balls from this box with replacement. What is the probability that both of
them are red?
(b) We randomly pick two balls from this box without replacement. What is the probability that both of
them are red?
Ex: Suppose two components A and B work independently. Further, P(A works) = 0.9 and P(B works) =
0.8. Find the P(System works), provided
(a) the two components are connected in series.
2
(b) the two components are connected in parallel.
The concept of independence can be extended to more than two events.
Def: The events A, B and C are said to mutually independent if P(A ∩ B ∩ C) = P(A) P(B) P(C) and all
the pairs of events are independent.
Note: Pairwise independence of A, B and C is not enough for the mutual independence of the three (see a
HW problem for an example).
Bayes’ formula
We have,
P(A|B) P(B) = P(A ∩ B) = P(B|A) P(A)
⇒ P(A|B) =
Formula of total probability
We have,
A = {A ∩ B} ∪ {A ∩ BC)
⇒ P(A) =
So, the Bayes’ formula becomes:
3
General case: Let B1,. . . Bk be mutually exclusive and exhaustive events (partition of S). Then,
P(A) =
•
Use it when P(A|Bj) are easier to compute than P(A).
Ex: Suppose 0.1% of US residents have active case of tuberculosis (TB). There is a diagnostic test for
TB, which is such that if a person has TB, it will give a positive result 99% of the times. Further, if a
person doesn’t have TB, it will give a negative result 96% of the times.
(a) Do you think that the diagnostic test is a good one?
(b) Your friend visited a doctor and was administered this test. This test is positive. What is the chance
that he has TB?
4