# How can I plot a ROC from this table? [duplicate]

I'm given a table

Class  |  Probability
P         .95
N         .85
P         .78


and so on. I'm asked to construct a ROC. As I understand, a ROC has TP for the Y axis and FP for X, but how can I get the TP/FP for the records in class N? For records in class P, TP is e.g. .95 and FP is .05, right? But what about records in class N? How can I find the TPR and FPR?

## marked as duplicate by Sycorax, Community♦Nov 1 '16 at 15:05

• you need to know what is the true class and what is your predicted class...looks like you getting a probability that observation being P class 0.95 etc. you can probably tell your classifier to give you the actual class. But it will only select a probability threshold (0.5 most likely) to determine the class. Then you can calculate ROC – Jan Sila Nov 1 '16 at 14:04