I cant draw the tree diagrams here, but it will help if you do so to visualise the problems here. Actually the questions are more on conditional probability than they are on Bayes' theorem.
Question:
In an urn, there are a total of 38 beads of which:
10 large red beads (LR)
8 large white beads(LW)
8 large green beads (LG)
5 small white beads (SW)
7 small red beads (SR)
One bead is drawn from the urn. The bead is placed back in the urn and a second bead is drawn. Calculate the probability
(a) the second bead drawn is small given that the first bead drawn is white
(b) the second bead drawn is white given that the first bead drawn is small
(c) the second bead drawn is white given that the first bead drawn is red
(d) the second bead drawn is large given that the first bead drawn is green
Solution:
(a)
p(S/W)=p(SnW)/p(W)
p(S) = (7+5)/38 = 12/38 = 6/19
So p(S/W) = p(S)p(W)/p(W)=p(S)= 6/19
(b)
p(W/S) = p(W n S)/p(S)
p(W n S) = p(W)p(S) since both events are independent
p(W)=(8+5)/38 = 13/38
So p(W/S)= p(W)p(S)/p(S) = p(W) = 13/38
(c)
p(W/R)=P(W n R)/p(R)
p(W n R) = p(W)p(R)
since getting white in the second take is independent of whether you get red in the first take since the bead was replaced.
So p(W/R) =p(W)p(R)/p(R)=p(W)= 13/38
(d)
p(L/G) = p(L n G)/p(G)
p(L n G) = p(L)p(G)
p(G) = 8/38
so p(L/G) = p(L)p(G)/p(G)= p(L) = 26/38 = 13/19
Question:
Seven tickets are numbered consecutively from 1 to 7. Two of them are selected in order without replacement.
A - The sum of the numbers on the two tickets is 9
B - Both tickets show prime numbers
C - The numbers on the two tickets differ by 1
Find (a) p(A/B) (b) p(B/C) (c) p(A/B)
Solution:
Sample space for event A
{ (2, 7), (3, 6), (4, 5), (5, 4), (6,3), (7, 2) }
p(A) = 6/42 = 1/7
Sample space for event B (Note that 1 is not a prime number)
{ (2,3), (2,5), (2,7), (3,2), (3,5),(3,7), (5,2), (5,3), (5,7), (7,2), (7,3), (7,5) }
p(B) = 12/42 = 2/7
Sample space for event C
{ (2,1), (2,3), (3,2), (3,4), (4,3), (4,5), (5,4), (5,6), (6,5), (6,7), (7,6) }
p(C) = 11/42
(a)
A n B = { (2,7), (7,2) }
p(A/B) = p(A n B) / p(B)
p(A n B) = 2/42 = 1/21
p(A/B) = (1/21) / (2/7) = 1/6
(b)
B n C = { (2,3), (3,2) }
p(B/C)= p(B n C) / p(C)
p(B n C)= 2/42 = 1/21
So p(B/C) = (1/21) / (11/42) = 2/11
(c)
p(B/A) = p(A/B)p(B)/p(A) (Bayes' Theorem)
= (1/6) x (2/7) / (1/7)
= 1/3
Question:
A taxicab was involved in a hit and run accident at night. Two cab companies, the Green and the Blue, operate in the city. You are given the following data:
85% of the cabs in the city are Green and 15% are Blue.
A witness identified the cab as Blue.
The court tested the reliability of the witness under the same conditions that existed the night of the accident. The court concluded that the witness correctly identifies each one of the two colours 80% of the time and fails 20% of the time.
What is the probability that the cab involved in the accident was Blue rather than Green, i.e. the witness correctly identified the cab colour?
Solution:
C- Event that the taxi colour is correctly identified
B - Blue taxi was identified
p(B) = p(green but accidentally identified as blue) + p(blue and identified correctly as blue)
=0.85 x 0.2 + 0.15 x 0.8 =0.29
p(C n B) = 0.15 x 0.8 = 0.12
p(C/B) = p(witness identifies correct colour given that it is blue)
=p(C n B)/p(B) = 0.12/0.29 = 0.41
Question:
Suppose as part of admission to graduate school a test is given. From past occurences, it is known that if a candidate is qualified to enter graduate school, he will succeed on the test 95% of the time, while an ineligible candidate will pass the test only 25% of the time.The school clarifies that in the past 80% of the people that applied were indeed qualified. The school has given the test to applicant Lewis, and he passed. What is the probability that he was qualified to attend graduate school?
Solution:
Q - Event that the candidate is qualified
S = Event that the candidate is successful (passed the test)
p(Q/S) = p(Q n S)/p(S)
p(S) = 0.8 x 0.95 + 0.2 x 0.25 = 0.81
p(Q n S) = 0.8 x 0.95 = 0.76
So P(Q/S) = 0.76/0.81 = 0.938
Question:
Management of a company find that 30% of secretaries hired are unsatisfactory. A test is devised to improve the situation. One hundred employees are chosen at random and are given newly constructed test. Out of these, 90% of the successful secretaries pass the test and 20% of the unsuccessful secretaries pass.
(a) Based on these results, if a person applies for a secretarial job, takes a test, and passes it, what is the probability that he or she is a good secretary?
(b) If the applicant fails the test, what is the probability that he or she is a good secretary?
Solution:
(a)
P- Event that the secretary passes the test
S- Event that the secretary is a good secretary
p(P) = 0.7 x 0.9 + 0.3 x 0.2 = 0.69
P(S n P) = 0.7 x 0.9 = 0.63
p(good secretary given that she passed)=p(S/P)=p(SnP)/p(P)=0.63/0.69 = 0.913
(b)
p(fails) = p(P') = 1 - p(P) =0.31
p(fails and good) = 0.7 x 0.1 = 0.07
p(good secretary given that she failed) = 0.07/0.31 = 0.226
Question:
A test attempts to recognise the presence of a certain disease. Records show that 22% of adults have some form of the disease, and the remaining adult population is free of the disease. The test is not completely reliable. A person with some form of the disease has a 5% chance of testing negative, thereby falsely indicating that he or she does not have the disease. A person who does not have the disease has an 11% chance of testing positive, thereby falsely indicating that the disease is present. Use the correct mathematical notation for your probabilities.
Let D be the event that an adult has some form of the disease.
Let P be the event that an adult tested positive for the disease.
(a) What is the probability that an adult has some form of the disease?
(b) What is the probability that a person who does not have the disease tests negative for the disease?
(c) If a person tests negative for the disease, what is the probability that he or she actually does not have a form of the disease?
Solution:
(a)
p(D) =0.22
(b)
p(P'/D')= p( P' n D ')/p(D')
p(P' n D') = 0.78 x 0.89 = 0.6942
p(D') = 0.78
So p(P'/D')= 0.6942/0.78 = 0.89
(c)
p(P') = 0.22 x 0.05 + 0.78 x 0.89 = 0.7052
p(D'/P')= p(P'/D')p(D') / p(P') (Bayes' Theorem)
= 0.89 x 0.78 / 0.7052
= 0.984
Bonus Question:
The Monty Hall Problem
Game show setting. There are 3 doors, behind one of which is a prize. Monty Hall, the host, asks you to pick a door, any door. You pick door A (say). Monty opens door B (say) and shows voila there is nothing behind door B. Gives you the choice of either sticking with your original choice of door A, or switching to door C.
Should you switch?
The Solution
Yes.
The a priori probability that the prize is behind door X, P(X) = 1/3
The probability that Monty Hall opens door B if the prize were behind A,
P(Monty opens B|A) = 1/2
The probability that Monty Hall opens door B if the prize were behind B,
P(Monty opens B|B) = 0
The probability that Monty Hall opens door B if the prize were behind C,
P(Monty opens B|C) = 1
The probability that Month Hall opens door B is then
p(Monty opens B) = p(A)*p(M.o. B|A) + p(B)*p(M.o. B|B) + p(C)*p(M.o. B|C)
= 1/6 + 0 + 1/3 = 1/2
Then, by Bayes' Theorem,
P(A|Monty opens B) = p(A)*p(Monty opens B|A)/p(Monty opens B)
= (1/6)/(1/2)
= 1/3
and
P(C|Monty opens B) = p(C)*p(Monty opens B|C)/p(Monty opens B)
= (1/3)/(1/2)
= 2/3
In other words, the probability that the prize is behind door C is higher when Monty opens door B, and you SHOULD switch!
Question and Solution taken from http://astro.uchicago.edu/rranch/vkashyap/Misc/mh.html
Saturday, September 16, 2006
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment