I have the following table with predictive probabilities and true class labels:
\begin{array}{|c|c|c|c|} \hline P(T=1) &0.54& 0.23 & 0.78 & 0.88 & 0.26 & 0.41 & 0.90 & 0.45&0.19&0.36 \\ \hline T&1&0 &0 &1 &0 &0& 1& 1& 0& 0\\ \hline \end{array}
The question is to compute the specificity & sensitivity at the threshold of 0.5.
My attempt at answering this question:
Sensitivity = true positive rate[P(T=1) > 0.5]
= (0.54 + 0.88 + 0.9)/4 = 0.58
Specificity = 1-false positive rate[P(T=1) > 0.5]
= 1- [(0.78)/6] = 0.87
Not sure if my working above is correct. I would appreciate if someone can guide me to the correct solution. Thanks.