Sensitivity and Specificity of diagnostic tests

" method=post>
Disease
Positive Negative
Test Positive True Positive (TP)
False Positive (FP)
TP + FP
Negative False Negative (FN)
True Negative (TN)
FN + TN
TP + FN
FP + TN
Sensitivity:
Specificity:
Positive Predictive Value (PPV):
Negative Predictive Value (NPV):
Likelihood Ratio Positive (LR+):    
Likelihood Ratio Negative (LR-):
Sensitivity

The probability of the test finding disease among those who have the disease or the proportion of people with disease who have a positive test result.

Sensitivity = true positives / (true positives + false negatives)


Specificity

The probability of the test finding NO disease among those who do NOT have the disease or the proportion of people free of a disease who have a negative test.

Specificity = true negatives / (true negatives + false positives)


Positive Predictive Value (PPV)

The percentage of people with a positive test result who actually have the disease.

Positive predictive value = true positives / (true positives + false positives)


Negative Predictive Value (NPV)

The percentage of people with a negative test who do NOT have the disease.

Negative predictive value = true negatives / (true negatives + false negatives)


Likelihood Ratio Positive (LR+)

The odds that a positive test result would be found in a patient with, versus without, a disease.

Likelihood Ratio Positive (LR+) = Sensitivity / (1 - Specificity).


Likelihood Ratio Negative (LR-)

The odds that a negative test result would be found in a patient without, versus with, a disease.

Likelihood Ratio Negative (LR-) = (1- Sensitivity) / Specificity.


$val) { $temp += $val; } return $temp; } function sum2 ($nums) { $temp = 0; foreach ($nums as $key => $val) { $temp += pow($val,2); } return $temp; } function mean ($nums) { $temp = 0; foreach ($nums as $key => $val) { $temp += $val; } return $temp/sizeof($nums);; } function median ($nums) { $n = count($nums); sort($nums); if ($n & 1) { return $nums [($n-1)/2]; } else { return ($nums [($n-1)/2] + $nums [$n/2])/2; } } function mode ($nums) { foreach ($nums as $key => $val) { $counts[$val]++; } arsort($counts); if (count($nums)==count($counts)){ return "frequency for each data is 1"; }else{ return key($counts); } } function variance ($nums) { $n = count($nums); $mean = mean($nums); foreach ($nums as $key => $val) { $temp += pow($val - $mean, 2); } return $temp/$n; } function sd ($nums) { return sqrt(variance($nums)); } function skewness ($nums) { $n = count($nums); $mean = mean($nums); $sd = sd($nums); foreach ($nums as $key => $val) { $temp += pow(($val - $mean), 3); } $s = $temp/(($n - 1)*pow($sd,3)); return $s; } function kurtosis ($nums) { $n = count($nums); $mean = mean($nums); $sd = sd($nums); foreach ($nums as $key => $val) { $temp += pow(($val - $mean), 4); } $s = ($temp/(($n - 1)*pow($sd,4)))-3; return $s; } ?>
Source code is available at biophp.org