Conditional Probability
Quantitative Techniques - 1 Prof. Prof. Pritam Pritam Ranjan Ranjan OM & QT, IIM Indore Email:
[email protected] [email protected] Office: A - 102, Phone: 512
Conditional tional pro probabili bability ty,, independenc independence, e, Ba Baye yes’ s’ Session - 2: Condi Theorem with application Textbook coverage: Chapte Chapterr 8
Prof. Pritam Ranjan
QT - 1 (July 7, 2015) QT
1/25
Conditional Probability
Theory Definition: If P (B ) > 0, P (A|B ) =
P (A ∩ B ) P (B )
Product rule: P (A ∩ B ) = P (A|B )P (B )
Prof. Pritam Ranjan
QT - 1 (July 7, 2015) QT
2/25
Conditional Probability
Theory Total probability: P (A) = P (A|B )P (B ) + P (A|B � )P (B � )
If B 1 , ..., B n creates a partition of Ω, P (A) = P (A|B 1 )P (B 1 ) + P (A|B 2 )P (B 2 ) + · · · + P (A|B n )P (B n )
Prof. Pritam Ranjan
QT - 1 (July 7, 2015)
3/25
Conditional Probability
URN model 1. Draw two balls one at-a-time without replacement from an urn containing 4 red and 6 green balls. Find the probability of
(a) getting a red ball in the first draw. (b) getting a red ball in the second draw. (c) getting two diff erent coloured balls.
Prof. Pritam Ranjan
QT - 1 (July 7, 2015)
4/25
Conditional Probability
URN model 2. Flip a coin (with P (H ) = 0.25). If you get a head, draw one ball from urn-1. If you observe tail, randomly choose a ball from urn-2. Find the probability of getting a red ball.
Prof. Pritam Ranjan
QT - 1 (July 7, 2015)
5/25
Conditional Probability
Tree diagram 1. Draw two balls one at-a-time without replacement from an urn containing 4 red and 6 green balls. Find the probability of
(a) getting a red ball in the first draw. (b) getting a red ball in the second draw. (c) getting two diff erent coloured balls.
Prof. Pritam Ranjan
QT - 1 (July 7, 2015)
6/25
Conditional Probability
Tree diagram 2. Flip a coin (with P (H ) = 0.25). If you get a head, draw one ball from urn-1. If you observe tail, randomly choose a ball from urn-2. If the drawn ball is red, put it in the other urn, otherwise put it back in the same urn. Choose another ball from the urn you have just put the ball in. Find the prob. that the second draw is black.
Prof. Pritam Ranjan
QT - 1 (July 7, 2015)
7/25
Conditional Probability
Independent Events Definition Two events A and B are said to be independent if and only if (any of the following is true)
(a) P (A ∩ B ) = P (A) · P (B ) (b) P (A|B ) = P (A) (assuming P (B ) > 0) (c) P (B |A) = P (B ) (assuming P (A) > 0) Related Concepts:
Conditional independence Disjoint, mutually exclusive, exhaustive and independence Pairwise independent vs. mutually independent
Prof. Pritam Ranjan
QT - 1 (July 7, 2015)
8/25
Conditional Probability
Independent Events According to USA Today, 65% of Americans are overweight or obese. If five Americans are chosen at random, what is the probability that at least one of them is overweight or obese?
Prof. Pritam Ranjan
QT - 1 (July 7, 2015)
9/25
Conditional Probability
Joint probability table Questionnaire example: The question, ”Do you smoke?” was asked to 100 people. Results are shown in the table.
Male Female Total
Yes 19 12
No 41 28
(a) What is the probability that a randomly selected individual is a male who smokes? (a) What is the probability that a randomly selected male is a smoker? (b) What is the probability that a randomly selected smoker is male?
Prof. Pritam Ranjan
QT - 1 (July 7, 2015)
10/25
Conditional Probability
Joint probability table (Ex 8.47) The following table gives the percentages of men and women 20 years and older employed in various occupations (U.S. Survey). There are about 70-million men and 70-million women in the workforce. Management Service Sales Mining Production Total
Men 35 14 17 17 17 100%
Women 42 20 32 1 5 100%
(a) What does the number 14 in the table represent? (b) If you pick a person at random from the sales, what is probability you picked a woman? (c) If you know someone’s occupation, can you guess whether they are male or female? which occupation makes this guess easiest? (d) What is the probability of picking someone at random from the service industry?
Prof. Pritam Ranjan
QT - 1 (July 7, 2015)
11/25
Conditional Probability
Joint probability table Let A and B be two factors, and A1 , ..., Am and B 1 , ..., B n denote a partition (i.e., all possible values of A and B ). A1
A2
· ··
Am
B 1 B 2
.. .
B n
General rule:
Prof. Pritam Ranjan
QT - 1 (July 7, 2015)
12/25
Conditional Probability
Marketing example There are three major manufacturing companies that make a product: Dell, HP and Lenovo. Dell has a 50% market share, and HP has a 30% market share. 5% of Dell’s product is defective, 7% of HP’s is defective, and 10% of Lenovo’s product is defective. (a) Construct the joint probability table. (b) Check whether ”product is defective” and ”product came from Dell” are independent?
Prof. Pritam Ranjan
QT - 1 (July 7, 2015)
13/25
Conditional Probability
Bayes’ Theorem/Rule Typically, we talk about P (1st − stage event ) or P (2nd − stage event |1st − stage event ), e.g., Draw two balls one at-a-time without replacement from an urn containing 4 red and 6 green balls. Find the probability of
(a) getting a red ball in the first draw. (b) getting a red ball in the second draw given 1st is red. Assume: We don’t know what happened in the past, but we know the
present. Can we guess what happened in the past? Objective: to find inverse probability: (assumption: know the outcome
of 2nd stage event, but don’t know the outcome of the 1st stage event) P (1st − stage event |2nd − stage event ) Stage-1: observe the color of the 1st ball, Stage-2: observe the color of the 2nd ball. Objective: find P ( 1st ball was red | 2nd ball is red) Prof. Pritam Ranjan
QT - 1 (July 7, 2015)
14/25
Conditional Probability
Bayes’ Theorem/Rule NOT motivating enough !! e.g., [businessinsider.com] Suppose you are living with a partner and come home from a business trip to discover a strange pair of under**** in your dresser. What is the probability that your partner is cheating on you? Stage-1: partner cheated, Stage-2: found a strange under****. Objective: find P (partner cheated | found a strange under****)
Prof. Pritam Ranjan
QT - 1 (July 7, 2015)
15/25
Conditional Probability
Bayes’ Theorem/Rule Stage-1 event: B, Stage-2 event: A Simple case P (B |A) =
P (A|B )P (B ) P (A)
=
P (A|B )P (B ) P (A|B )P (B ) + P (A|B � )P (B � )
More complex version: P (Ai |B j )P (B j ) P (B j |Ai ) = � k P (Ai |B k )P (B k )
Foundation of Bayesian Statistics
Prof. Pritam Ranjan
QT - 1 (July 7, 2015)
16/25
Conditional Probability
URN model 1. Draw two balls one at-a-time without replacement from an urn containing 4 red, 6 green and 13 black balls. Find the probability of
(a) getting a red ball in the first draw given you observed a red ball in the second draw. (b) getting a non-red ball in the first draw given you observed a red ball in the second draw.
Prof. Pritam Ranjan
QT - 1 (July 7, 2015)
17/25
Conditional Probability
Marketing application (Ex 8.40) Some of the managers at a company have an MBA degree. Of managers at the level of director or higher, 60% have an MBA. Among other managers of lower rank, 35% have an MBA. For this company, 15% of managers have a position at the level of director or higher. If you meet an MBA from this firm, what are the chances that this person is a director (or higher)?
Prof. Pritam Ranjan
QT - 1 (July 7, 2015)
18/25
Conditional Probability
Drug testing application An HIV test gives a positive result with probability 98% when the patient is indeed aff ected by HIV, while it gives a negative result with 99% probability when the patient is not aff ected by HIV. If a patient is drawn at random from a population in which 0.1% of individuals are aff ected by HIV and he is found positive, what is the probability that he is indeed aff ected by HIV?
Prof. Pritam Ranjan
QT - 1 (July 7, 2015)
19/25
Conditional Probability
Quality control There are three major manufacturing companies that make a product: Dell, HP and Lenovo. Dell has a 50% market share, and HP has a 30% market share. 5% of Dell’s product is defective, 7% of HP’s is defective, and 10% of Lenovo’s product is defective. (a) If a product is found defective, what is the probability that it came from Dell?
Prof. Pritam Ranjan
QT - 1 (July 7, 2015)
20/25
Conditional Probability
Quality control Consider a firm that manufactures integrated circuits (chips). Based on extensive (and expensive) testing of a sample of 1000 chips, it finds that the defect rate s 10%. It found that the inspector typically had a 5% error rate on both defective and non-defective chips. Find the probability a randomly chosen chip is defective in the lot that has passed the inspection.
Prof. Pritam Ranjan
QT - 1 (July 7, 2015)
21/25
Conditional Probability
Real Estate business A realtor is trying to sell a large piece of property. She believes there is a 0.90 probability that the property will be sold in the next 6 months if the local economy continues to improve throughout the period, and a 0.50 probability the property will be sold if the local economy does not continue its improvement during the period. A state economist consulted by the realtor believes there is a 0.70 chance the economy will continue its improvement during the next 6 months. What is the probability that the piece of property will be sold during the period?
Prof. Pritam Ranjan
QT - 1 (July 7, 2015)
22/25
Conditional Probability
Stock market Two stocks A and B are known to be related in that both are in the same industry. The probability that stock A will go up in price tomorrow is 0.20, and the probability that both stocks A and B will go up tomorrow is 0.12. Suppose that tomorrow you find that stock A did go up in price. What is the probability that stock B went up as well?
Prof. Pritam Ranjan
QT - 1 (July 7, 2015)
23/25
Conditional Probability
CASE: Job application A business graduate wants to get a job in any one of the top 10 accounting firms. Applying to any of these firms requires a lot of eff ort and paperwork and is therefore costly. She estimates the cost of applying to each of the 10 firms and the probability of getting a job off er there. Firm Cost Prob
1 870 0.38
2 600 0.35
3 540 0.28
4 500 0.20
5 400 0.18
6 320 0.18
7 300 0.17
8 230 0.14
9 200 0.14
1
If the graduate applies to all 10 companies, what is the probability that she will get at least one o ff er?
2
If she can apply to only one firm, based on cost and success probability criteria alone, should she apply to firm 5? Why?
3
If she applies to companies 2, 5, 8, and 9, what is the total cost? What is the probability that she will get at least one off er?
Prof. Pritam Ranjan
QT - 1 (July 7, 2015)
10 170 0.08
24/25
Conditional Probability
Homework
Practice questions:
Chapter 8 Next topic: (discrete) Random Variables Finish unsolved examples from today’s lecture
Prof. Pritam Ranjan
QT - 1 (July 7, 2015)
25/25