22.02.2014 Views

Discrete Mathematics University of Kentucky CS 275 Spring ... - MGNet

Discrete Mathematics University of Kentucky CS 275 Spring ... - MGNet

Discrete Mathematics University of Kentucky CS 275 Spring ... - MGNet

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Example: We have 2 boxes. The first box contains 2 green and 7 red balls. The<br />

second box contains 4 green and 3 red balls. We select a box at random, then a<br />

ball at random. If we picked a red ball, what is the probability that it came from<br />

the first box?<br />

• Let E be the event that we chose a red ball. Thus, E is the event that we<br />

chose a green ball. Let F be the event that we chose a ball from the first box.<br />

Thus, F is the event that we chose a ball from the second box. p(F) = p(F) =<br />

0.5 since we pick a box at random.<br />

• We want to calculate p(F|E) = p(E3F) / p(E), which we will do in stages.<br />

• p(E|F) = 7/9 since there are 7 red balls out <strong>of</strong> 9 total in box 1. p(E|F) = 3/7<br />

since there are 3 red balls out <strong>of</strong> a total <strong>of</strong> 7 in box 2.<br />

• p(E3F) = p(E|F)p(F) = 7/18 = 0.389 and p(E3F) = p(E|F)p(F) = 3/14.<br />

• We need to find p(E). We do this by observing that E = (E3F)2(E3F),<br />

where E3F and E3F are disjoint sets. So, p(E) = p(E3F)+p(E3F) = 0.603.<br />

• p(F|E) = p(E3F) / p(E) = 0.389 / 0.603 = 0.645, which is greater than the 0.5<br />

from the second bullet above. We have improved our estimate!<br />

117<br />

Example: Suppose one person in 100,000 has a particular rare disease and that<br />

there is an accurate diagnostic test for this disease. The test is 99% accurate when<br />

given to someone with the disease and is 99.5% accurate when given to someone<br />

who does not have the disease. We can calculate<br />

(a) the probability that someone who tests positive has the disease, and<br />

(b) the probability that someone who tests negative does not have the disease.<br />

Let F be the event that a person has the disease and let F be the event that this<br />

person tests positive. We will use Bayes theorem to calculate (a) and (b), so have<br />

to calculate p(F), p(F), p(E|F), and p(E|F).<br />

• p(F) = 1 / 100000 = 10 45 and p(F) = 1 4 p(F) = 0.99999.<br />

• p(E|F) = 0.99 since someone who has the disease tests positive 99% <strong>of</strong> the<br />

time. Similarly, we know that a false negative is p(E|F) = 0.01. Further,<br />

p(E|F) = 0.995 since the test is 99.5% accurate for someone who does not<br />

have the disease.<br />

• p(E|F) = 0.005, which is the probability <strong>of</strong> a false negative (100 4 99.5%).<br />

118

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!