document.write( "Question 1170696: A certain disease has an incidence rate of 1.9%. When you have the disease, the test will give a positive result 96% of the time. When you don't have the disease, it gives a false positive 3% of the time. Compute the probability that a person who tests positive actually has the disease.\r
\n" );
document.write( "\n" );
document.write( " \n" );
document.write( "
Algebra.Com's Answer #795591 by math_tutor2020(3817)![]() ![]() ![]() You can put this solution on YOUR website! \n" ); document.write( "D = person has disease \n" ); document.write( "~D = opposite of event D = person does not have disease \n" ); document.write( "P(D) = 0.019 = probability person has disease\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "P(D) + P(~D) = 1 \n" ); document.write( "P(~D) = 1 - P(D) \n" ); document.write( "P(~D) = 1 - 0.019 \n" ); document.write( "P(~D) = 0.981 = probability person does not have disease\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "T = person tests positive \n" ); document.write( "P(T given D) = probability of testing positive given the person has the disease \n" ); document.write( "P(T given D) = 0.96 = true positive \n" ); document.write( "P(T given ~D) = 0.03 = false positive\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "From the conditional probability formula, we know, \n" ); document.write( "P(T given D) = P(T and D)/P(D) \n" ); document.write( "P(T given ~D) = P(T and ~D)/P(~D)\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "We can rearrange each equation into \n" ); document.write( "P(T and D) = P(T given D)*P(D) \n" ); document.write( "P(T and ~D) = P(T given ~D)*P(~D)\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "By the law of total probability \n" ); document.write( "P(T) = P(T and D) + P(T and ~D) \n" ); document.write( "P(T) = P(T given D)*P(D)+P(T given ~D)*P(~D) \n" ); document.write( "P(T) = 0.96*0.019+0.03*0.981 \n" ); document.write( "P(T) = 0.04767 \n" ); document.write( "Which is the probabilty of testing positive.\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "The goal we want is to compute P(D given T) \n" ); document.write( "This is the probability of having the disease given the test was positive.\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "We'll use the conditional probability definition again \n" ); document.write( "P(D given T) = P(D and T)/P(T) \n" ); document.write( "P(D given T) = P(T and D)/P(T) \n" ); document.write( "P(D given T) = [ P(T given D)*P(D) ]/P(T) ..... Bayes Theorem \n" ); document.write( "P(D given T) = [ 0.96*0.019 ]/0.04767 \n" ); document.write( "P(D given T) = 0.01824/0.04767 \n" ); document.write( "P(D given T) = 0.38263058527376 \n" ); document.write( "P(D given T) = 0.3826 \n" ); document.write( "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.\r \n" ); document.write( " \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "------------------------------------------------------------------------\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "Here's a concrete example.\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "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. \r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "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.\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "So far we have this two way table of values \n" ); document.write( "
\n" ); document.write( "The values A,B,C,D,E,F are placeholders for numbers we'll fill in later.\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "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 \n" ); document.write( "A+B = 1900 \n" ); document.write( "B = 1900-A \n" ); document.write( "B = 1900-1824 \n" ); document.write( "B = 76 \n" ); document.write( "We have 76 people who have the disease, but don't test positive (they test negative).\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "Move onto the fact that 3% is the false positive rate. \n" ); document.write( "0.03*98100 = 2943 people test positive but they don't have the disease. \n" ); document.write( "This leaves 98100-2943 = 95157 people who test negative and don't have the disease. \n" ); document.write( "So we'll replace C with 2943 and D with 95157\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "The values of E and F are the sums of the columns \n" ); document.write( "E = A+C = 1824+2943 = 4767 \n" ); document.write( "F = B+D = 76+95157 = 95233\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "This is what the table looks like after all the variables have been filled in \n" ); document.write( "
\n" ); document.write( " \n" ); document.write( "\n" ); document.write( "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.\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "The probability we're after is going to be 1824/4767 = 0.38263058527376 = 0.3826\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "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.\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "Whichever approach you use, the final answer is approximately 0.3826\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "If you want that as a fraction, then you'll reduce 1824/4767 to get 608/1589. Divide both parts by the GCF 3. \r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "------------------------------------------------------------------------\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "Answer in fraction form = 608/1589 \n" ); document.write( "Answer in decimal form = 0.3826 (value is approximate) \n" ); document.write( "Answer in percent form = 38.26% (value is approximate)\r \n" ); document.write( "\n" ); document.write( " \n" ); document.write( " |