Probability Revision MED INF 406 Assignment 5 Golkonda, Jyothi 11/4/2012
Problem Statement Assume that the incidence for Lyme disease in the state of Connecticut is 78 cases per 100,000. A diagnostic test for the disease has a sensitivity of 81% and a specificity of 96%. Select two different probability revision techniques and use both to calculate: a) The probability that a person being tested in Connecticut has Lyme disease given a positive result for the test. b) The probability that the person has Lyme disease given a negative test result. 2 x 2 table Analysis True Positive A patient has a disease and the test result was positive False Positive A patient does not have a disease but the test result is positive False Negative A patient has a disease but the test result was negative True Negative A patient does not have a disease and the test result was negative 78 cases per 100,000 had Lyme disease. Hence percent of patients with Lyme disease = (78/100000) * 100 = 0.078% =( TP + FN) Percent of patients who do not have Lyme disease = 100 0.078 = 99.922% = (TN + FP) Sensitivity = 81% = 0.81 = TP/(TP+FN) TP/(TP+FN) = 0.81 TP/0.078 = 0.81 TP = 0.81 * 0.078 = 0.063% TP + FN = 0.078% 0.063 + FN = 0.078 FN = 0.078 0.063 = 0.015% Specificity = 96% = 0.96 = TN /(TN+FP) TN /(TN+FP) = 0.96 TN / 99.922 = 0.96 TN = 0.96 * 99.922 = 95.925 % FP = 99.922 95.925 = 3.997%
(Positive test) 4.06% Percent with Lyme disease (Disease) 0.078% 0.063% True positive (TP) Percent without Lyme disease (No Disease) 99.922% 3.997% False positive (FP) (Negative test) 95.94% 0.015% False Negative (FN) 95.925% True Negative (TN) Positive predictive value (Probability that the person actually has Lyme disease when the test result is positive) = TP/(TP + FP) = 0.063/(0.063 + 3.997) = 0.0155 or 1.55 % Negative predictive value (Probability that the person is disease free when the test result is negative) = TN/(TN + FN) = 95.925/(95.925 + 0.015) = 0.9998 or 99.98% Probability that the person has Lyme disease given a negative test result = FN/(TN+FN) = 0.015/(95.925 + 0.015) = 0.015/95.94 = 0.000156 = 0.0156% 2x2 Alternate calculations 78 cases out of 100,000 had Lyme disease. Number of cases who did not have Lyme disease = 100,000 78 = 99,922 Sensitivity of diagnostic test = 81% i.e. 81% of 78 cases will have a positive test result = 78 * (81/100) = 63 = True positive The rest of the 78 cases will show negative. False negative = 78-63 = 15 Specificity of the diagnostic test = 96% i.e. 96 % of 99,922 cases will have negative test result = 99922 * (96/100) = 95925 = True negative The rest of the cases will show positive when there is no disease.
False positive = 99922 95925 = 3997 Lyme disease (D+) No Lyme disease (D-) Total Positive test (T+) 63 True positive (TP) 3997 False positive (FP) 4060 Negative test (T-) 15 95925 95940 False Negative (FN) True Negative (TN) Total 78 99,922 100,000 Positive predictive value (Probability that the person actually has Lyme disease when the test result is positive) = TP/(TP + FP) = 63/(63 + 3997) = 63/4060 = 0.0155 or 1.55 % Probability that the person has Lyme disease given a negative test result = FN/(TN+FN) = 15/(95925 + 15) = 15/95940 = 0.000156 = 0.0156% Bayes' formula Postpositive test probability = Sensitivity * pretest probability (Sensitivity * pretest probability) + ((1-specificity) * (1-pretest probability)) Sensitivity = 81% = 0.81 Pretest probability = 78/100000 = 0.00078 Specificity = 96% = 0.96
Postpositive test probability = probability that the person has Lyme disease when the test result is positive = (0.81 * 0.00078)/ ((0.81 * 0.00078) + ((1-0.96) *(1-0.00078))) = 0.00063/(0.00063 + 0.03997) = 0.00063/0.0405988 = 0.0155 or 1.55% Postnegative test probability = Probability that the person has Lyme disease when the test result is negative = (1-Sensitivity) * pretest probability ((1-Sensitivity) * pretest probability) + (specificity * (1-pretest probability)) = (1-0.81) *0.00078/(((1-0.81) * 0.00078) + (0.96 * (1-0.00078)) = 0.19 * 0.00078/((0.19 * 0.00078) + (0.96 * 0.99922)) = 0.0001482/(0.0001482 + 0.9592512) = 0.0001482/0.9593994 = 0.00015 = 0.015% Decision Tree 78 out of 100,000 cases have LymeDisease In the Decision tree the initial node has the total population which is 100,000 The two chance nodes are cases with Lyme disease which is 78 Cases without Lyme disease will be 100,000-78 = 99,922 Hence the probability for each node is 0.00078 and 0.99922 respectively The sensitivity of the test is 81% The probability of the branch with positive test results for the chance node with Lyme disease is 0.81 The probability of the branch with negative test results = 1-0.81 = 0.19 The specificity of the test is 96% The probability of the branch with a negative test result on the chance node with no Lyme disease is 0.96 The probability of the branch with positive test result = 1 0.96 = 0.04 True Positives (TP) = 78 * 0.81 = 63 False Negative (FN) = 78 * 0.19 = 15 False Positive (FP) = 99922 * 0.04 = 3997 True Negative (TN) = 99922 * 0.96 = 95925
Lyme disease 0.00078 100,000 0.99922 No Lyme disease Positive Test 0.81 78 Negative Test 0.19 Positive Test 0.04 99922 Negative Test 0.96 True positive = 78 *0.81 = 63 False Negative = 15 False Positive = 3997 True Negative = 95925 Positive predictive value (Probability that the person actually has Lyme disease when the test result is positive) = TP/(TP + FP) = 63/(63 + 3997) = 63/4060 = 0.0155 or 1.55 % Probability that the person has Lyme disease given a negative test result = FN/(TN+FN) = 15/(95925 + 15) = 15/95940 = 0.000156 = 0.0156% The odds-likelihood form of Bayes' Likelihood Ratio = Sensitivity/ (1 specificity) = 0.81/(1-0.96) = 20.25 Pretest odds = P/(1 P) Pretest probability = 78/100,000 = 0.00078 Pretest odds = 0.00078/(1-0.00078) = 0.00078/0.99922 = 0.00078 Posttest odds = 20.25 * 0.00078 = 0.0156 Converting odds to probability = O/ (1 + O) = 0.0156/(1+0.0156) = 0.0156/1.0156 = 0.015 = 1.55% Probability that the person actually has Lyme disease when the test result is positive = 1.55% Probability that the person has Lyme disease given a negative test result Likelihood Ratio = (1- Sensitivity)/ (specificity) = 0.19/(0.96) = 0.198 Pretest odds = P/(1 P)
Pretest probability = 78/100,000 = 0.00078 Pretest odds = 0.00078/(1-0.00078) = 0.00078/0.99922 = 0.00078 Posttest odds = 0.198 * 0.00078 = 0.00015 Converting odds to probability = O/ (1 + O) = 0.00015/(1+0.00015) = 0.00015/1.00015 = 0.00015 = 0.015% Probability that the person has Lyme disease given a negative test result = 0.015%