Conditional Probability: Problems and Solutions, Study notes of Probability and Statistics

Three problems related to conditional probability. The first problem is about a test for skin cancer, the second problem is about choosing a slot machine, and the third problem is about two treatments for kidney stones. The problems require the use of Bayes' theorem. solutions to all three problems with step-by-step explanations.

Typology: Study notes

2021/2022

Uploaded on 05/11/2023

edmond
edmond 🇺🇸

3.8

(10)

251 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Math 10B Spring 2018 Discrete Probability Worksheet 2
Discrete Probability Worksheet 2: Conditional Probability
1. Suppose there is a test for checking the presence of skin cancer. When cancer is present, the
test is positive 90% of the time and negative the other 10%. When cancer is not present, the
test is positive 10% of the time, and negative the other 90%. Furthermore, the probability
of having cancer is 1%. If someone receives the test and the result is positive, what is the
probability that they have cancer? Hint: Use Bayes’ theorem.
Solution: Let Cancer denote the event that the person has cancer and let Positive de-
note the event that the person’s test result is positive. We can summarize the information
given in the problem as
P(Cancer)=0.01
P(Positive |Cancer)=0.9
P(Positive |CancerC) = 0.1
We are trying to find P(Cancer |Positive). Using Bayes’ theorem, we have
P(Cancer |Positive) = P(Positive |Cancer)P(Cancer)
P(Positive)=0.9·0.01
P(Positive)
We can find the denominator above as follows:
P(Positive) = P(Positive Cancer) + P(Positive CancerC)
=P(Positive |Cancer)P(Cancer) + P(Positive |CancerC)P(CancerC)
= 0.9·0.01 + 0.1·0.99
So the final answer is 0.9·0.01
0.9·0.01+0.1·0.99 0.0833 . In other words, even if someone tests
positive, there is still less than a 10% chance they have cancer. This is because the initial
probability of having cancer is so low.
2. Suppose that there are two slot machines, one of which pays out 10% of the time and the
other pays out 20% of the time. Unfortunately, you have no idea which is which. Suppose
you randomly choose a machine and put in a quarter. If you don’t get a jackpot, what is the
chance that you chose the machine that pays out 20% of the time? If you had instead gotten
a jackpot, what would be the chance that you chose the one that pays out 20% of the time?
Solution: This is very similar to the previous problem. Let Sbe the event that you
chose the first slot machine, i.e. the one that pays out 10% of the time (so SCis the event
that you chose the second slot machine). Let Jbe the event that you got a jackpot. The
information given in the problem is
P(S) = 0.5
pf3
pf4
pf5

Partial preview of the text

Download Conditional Probability: Problems and Solutions and more Study notes Probability and Statistics in PDF only on Docsity!

Discrete Probability Worksheet 2: Conditional Probability

  1. Suppose there is a test for checking the presence of skin cancer. When cancer is present, the test is positive 90% of the time and negative the other 10%. When cancer is not present, the test is positive 10% of the time, and negative the other 90%. Furthermore, the probability of having cancer is 1%. If someone receives the test and the result is positive, what is the probability that they have cancer? Hint: Use Bayes’ theorem.

Solution: Let Cancer denote the event that the person has cancer and let Positive de- note the event that the person’s test result is positive. We can summarize the information given in the problem as

  • P (Cancer) = 0. 01
  • P (Positive | Cancer) = 0. 9
  • P (Positive | CancerC^ ) = 0. 1

We are trying to find P (Cancer | Positive). Using Bayes’ theorem, we have

P (Cancer | Positive) = P (Positive | Cancer)P (Cancer) P (Positive)

P (Positive)

We can find the denominator above as follows:

P (Positive) = P (Positive ∩ Cancer) + P (Positive ∩ CancerC^ ) = P (Positive | Cancer)P (Cancer) + P (Positive | CancerC^ )P (CancerC^ ) = 0. 9 · 0 .01 + 0. 1 · 0. 99

So the final answer is (^0). 9 · 00 .01+0.^9 ·^0.^01. 1 · 0. 99 ≈ 0 .0833. In other words, even if someone tests positive, there is still less than a 10% chance they have cancer. This is because the initial probability of having cancer is so low.

  1. Suppose that there are two slot machines, one of which pays out 10% of the time and the other pays out 20% of the time. Unfortunately, you have no idea which is which. Suppose you randomly choose a machine and put in a quarter. If you don’t get a jackpot, what is the chance that you chose the machine that pays out 20% of the time? If you had instead gotten a jackpot, what would be the chance that you chose the one that pays out 20% of the time?

Solution: This is very similar to the previous problem. Let S be the event that you chose the first slot machine, i.e. the one that pays out 10% of the time (so SC^ is the event that you chose the second slot machine). Let J be the event that you got a jackpot. The information given in the problem is

  • P (S) = 0. 5

• P (J | S) = 0. 1

• P (J | SC^ ) = 0. 2

We want to find P (SC^ | JC^ ) and P (SC^ | J). We can find both by applying Bayes’ theorem, just as in the previous problem (though this time we won’t explain every detail of the calculation):

P (SC^ | JC^ ) =

P (JC^ | SC^ )P (SC^ )

P (JC^ )

P (JC^ | SC^ )P (SC^ )

P (JC^ | SC^ )P (SC^ ) + P (JC^ | S)P (S)

Similarly,

P (SC^ | J) =

P (J | SC^ )P (SC^ )

P (J)

P (J | SC^ )P (SC^ )

P (J | SC^ )P (SC^ ) + P (J | S)P (S)

  1. Kidney stones is an affliction that comes in two varieties: small stones and large stones. Suppose that there are two treatments for kidney stones: treatment A and treatment B. Suppose that the success probabilities of these two types of treatment are as shown in the following table. Treatment A Treatment B Small Stones 93% 87% Large Stones 73% 68% Also suppose that a patient with kidney stones is equally likely to have small stones or large stones and that patients with small stones receive treatment A with probability 20% and patients with large stones receive treatment A with probability 80%. All patients who don’t receive treatment A receive treatment B. Given that a patient receives treatment A, what is the chance that it is successful? Given that a patient receives treatment B, what is the chance that it is successful? Which treatment do you think is better? By the way, this is a real example. The general phenomenon is known as “Simpson’s paradox.”

Comment: If you only see these final answers, it is tempting to believe that treatment B is better. However, when you look at the table of success probabilities above, it seems that treatment A is better for both small stones and large stones! What is going on? The answer is that despite that fact that treatment A is apparently more successful, treatment A is used more frequently for patients with large stones. But both treatments A and B are less likely to succeed on patients with large stones. Here’s one way to think about this: treatment A is most often used on patients for which both methods have trouble, whereas treatment B is most often used on patients for which both methods work well, creating the illusion that treatment B is better overall. The lesson here is not that treatment A is better—although based on the evidence given above, that seems likely—but rather that you should be careful when reasoning about probabilities: they don’t always indicate what you intuitively think they should.

  1. Show that your belief in something should never increase both when some other event occurs and when it doesn’t occur. Formally, show that if P (A | B) > P (A) then P (A | Bc) < P (A). By the way, this may seem like an obvious fact, but it has some surprising implications. For instance, if you believe Bitcoin might be a bubble and if the price of Bitcoin rising increases your belief that Bitcoin was a bubble then the price of Bitcoin falling should decrease your belief that Bitcoin was a bubble (and vice-versa).

Solution: Let’s assume for a moment that P (A | Bc) ≥ P (A) and see what that implies. As we’ve seen in class, we can always write

P (A) = P (A ∩ B) + P (A ∩ Bc).

By definition of conditional probability, we also have that

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

Therefore P (A) = P (A | B)P (B) + P (A | Bc)P (Bc). But since we have assumed that P (A | B) > P (A) and P (A | Bc) ≥ P (A), this means that P (A) > P (A)P (B) + P (A)P (Bc) = P (A)(P (B) + P (Bc)). By the laws of probability, P (B) + P (Bc) = 1. Therefore the above equation implies that

P (A) > P (A).

Since this conlcusion is absurd, our original assumption must have been false. So we can conclude that P (A | Bc) < P (A).

  1. Suppose you are playing a game where someone rolls two fair 6-sided dice. If both rolls are ones, you win a million dollars. (a) If you are told that the first roll is a one, what is the chance that you will win?

Solution: Let A be the event that the first roll is a one and B the event that both rolls are one. The question is asking for P (B | A). By definition,

P (B | A) =

P (B ∩ A)

P (A)

The intersection of A and B is just B—if both rolls are one then the first roll must be one. The probability that both rolls are one is

P (B) =

and the probability that the first roll is one is

P (A) =

Therefore the answer is 1 / 62 1 / 6

(b) If you are told that at least one of the rolls is a one, what is the chance that you will win?

Solution: Let C be the event that at least one roll is a one and let B be as in the solution to part (a). The question is asking for P (B | C). Once again by definition of conditional probability, P (B | C) =

P (B ∩ C)

P (C)

As before, B ∩ C = B since if both rolls are one, then at least one roll is one. So we just need to calculate P (C). To do this, let’s define our sample space Ω to be the set of all pairs of numbers between one and six. Since the dice are fair, every outcome in Ω is equally likely. And |Ω| = 36. To find |C|, observe that the number of pairs of numbers that don’t contain a one is 5 × 5 = 25. So |C| = |Ω| − 25 = 11. Therefore

P (C) =

and so P (B | C) =