Question 1170696
<font color=black size=3>
D = person has disease
~D = opposite of event D = person does not have disease
P(D) = 0.019 = probability person has disease


P(D) + P(~D) = 1
P(~D) = 1 - P(D)
P(~D) = 1 - 0.019
P(~D) = 0.981 = probability person does not have disease


T = person tests positive
P(T given D) = probability of testing positive given the person has the disease
P(T given D) = 0.96 = true positive
P(T given ~D) = 0.03 = false positive


From the conditional probability formula, we know,
P(T given D) = P(T and D)/P(D)
P(T given ~D) = P(T and ~D)/P(~D)


We can rearrange each equation into
P(T and D) = P(T given D)*P(D)
P(T and ~D) = P(T given ~D)*P(~D)


By the law of total probability
P(T) = P(T and D) + P(T and ~D)
P(T) = P(T given D)*P(D)+P(T given ~D)*P(~D)
P(T) = 0.96*0.019+0.03*0.981
P(T) = 0.04767
Which is the probabilty of testing positive.


The goal we want is to compute P(D given T)
This is the probability of having the disease given the test was positive.


We'll use the conditional probability definition again
P(D given T) = P(D and T)/P(T)
P(D given T) = P(T and D)/P(T)
P(D given T) = [ P(T given D)*P(D) ]/P(T) ..... Bayes Theorem
P(D given T) = [ 0.96*0.019 ]/0.04767
P(D given T) = 0.01824/0.04767
P(D given T) = 0.38263058527376
P(D given T) = 0.3826
The probability of having the disease, when the test was positive, is roughly 0.3826; so there's an approximate chance of 38.26% of this happening.



------------------------------------------------------------------------


Here's a concrete example.


Consider a town of 100,000 people. In this hypothetical scenario, people cannot leave the town, nor can any visitors enter it. It is isolated from other cities. 


Having a disease incidence rate of 1.9% means 0.019*100,000 = 1,900 people have the disease out of 100,000 total. This leaves 100,000-1,900 = 98,100 who don't have the disease.


So far we have this two way table of values
<table border = "1" cellpadding = "5"><tr><td></td><td>Test Positive</td><td>Test Negative</td><td>Total</td></tr><tr><td>Has Disease</td><td>A</td><td>B</td><td>1,900</td></tr><tr><td>Does Not Have Disease</td><td>C</td><td>D</td><td>98,100</td></tr><tr><td>Total</td><td>E</td><td>F</td><td>100,000</td></tr></table>
The values A,B,C,D,E,F are placeholders for numbers we'll fill in later.


Now use the fact that 96% of those who have the disease will test positive. So 0.96*1900 = 1824 people with the disease will test positive. This is the value A in the table. The value of B must add with A to get 1900
A+B = 1900
B = 1900-A
B = 1900-1824
B = 76
We have 76 people who have the disease, but don't test positive (they test negative).


Move onto the fact that 3% is the false positive rate.
0.03*98100 = 2943 people test positive but they don't have the disease.
This leaves 98100-2943 = 95157 people who test negative and don't have the disease. 
So we'll replace C with 2943 and D with 95157


The values of E and F are the sums of the columns
E = A+C = 1824+2943 = 4767
F = B+D = 76+95157 = 95233


This is what the table looks like after all the variables have been filled in
<table border = "1" cellpadding = "5"><tr><td></td><td>Test Positive</td><td>Test Negative</td><td>Total</td></tr><tr><td>Has Disease</td><td>1,824</td><td>76</td><td>1,900</td></tr><tr><td>Does Not Have Disease</td><td>2,943</td><td>95,157</td><td>98,100</td></tr><tr><td>Total</td><td>4,767</td><td>95,233</td><td>100,000</td></tr></table>


Now we're considering the scenario that a person has tested positive. There are 4767 people total (bottom of column 1) who have done so. Of this total, exactly 1824 people have the disease.


The probability we're after is going to be 1824/4767 = 0.38263058527376 = 0.3826


Note how the expression 1824/4767 is very similar to 0.01824/0.04767; all we've really done is move the decimal over to the right 5 spaces. It's not a coincidence that 100,000 = 10^5 was used as the total population here, just to give this concrete example whole numbers to deal with, rather than fractions.


Whichever approach you use, the final answer is approximately 0.3826


If you want that as a fraction, then you'll reduce 1824/4767 to get 608/1589. Divide both parts by the GCF 3. 


------------------------------------------------------------------------


Answer in fraction form = 608/1589
Answer in decimal form = 0.3826  (value is approximate)
Answer in percent form = 38.26%  (value is approximate)

</font>