So, I have 16 trials in which I am trying to authenticate a person from a biometric trait using Hamming Distance. My threshold is set to 3.5. My data is below and only trial 1 is a True Positive:

Trial   Hamming Distance
1   0.34
2   0.37
3   0.34
4   0.29
5   0.55
6   0.47
7   0.47
8   0.32
9   0.39
10  0.45
11  0.42
12  0.37
13  0.66
14  0.39
15  0.44
16  0.39

My point of confusion is that I am really unsure about how to make an ROC curve (FPR vs. TPR OR FAR vs. FRR) from this data. It doesn't really matter which one, but I'm just really confused about how to go about calculating it. Any help would be appreciated.


I suggest ROC Graphs: Notes and Practical Considerations for Reasearchers by Tom Fawcett, really an excellent read. As far as I understand your question, you will find everything you need in this paper.

Edit: Inspired by Adam I also want to recommend my favorite R-package for this task: ROCR.

  • $\begingroup$ Do you know any good Matlab packages that can get the job done? $\endgroup$ – rohanbk Dec 4 '10 at 20:01
  • $\begingroup$ @rohanbk Sorry, no. It is a long time since I have used matlab. $\endgroup$ – steffen Dec 6 '10 at 7:42
  • $\begingroup$ @steffen link is broken. $\endgroup$ – Alleo Dec 2 '15 at 0:10
  • $\begingroup$ @Alleo thank you for the notification, the link is now pointing to citeseer (where pdf is available)... this should last longer. $\endgroup$ – steffen Dec 3 '15 at 16:49

Why do you want to make an ROC curve? Do you want to graph the curve for your dependent variables, or are you looking to use it as a test statistic in order to gauge the accuracy of your probability predictions (in which case you're looking for the AUC [area under the curve]).

If you're familiar with R, the verification package in R has two functions that you will find useful: roc.plot(), which will allow you to plot your ROC curve, and roc.area() which will allow you to calculate the AUC.

  • $\begingroup$ Do you know any good Matlab packages that can get the job done? $\endgroup$ – rohanbk Dec 4 '10 at 20:00

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.