# Why is the ROC curve of a random classifier the line $x=y$?

The title is my whole question.

-
By $x$ & $y$ in the ROC curve, I gather you mean the False Positive Rate & the True Positive Rate, right? –  gung Dec 24 '12 at 15:31
Yes, precisely. :) –  Pippo Dec 24 '12 at 16:06

If you classify a fraction $k$ of your cases as positive then, because of the randomness, the same fraction $k$ of cases which should be positive will be classified positive (true positives), and the same fraction $k$ of cases which should be negative will be classified positive (false positives).

So the true positive rate and the false positive rate are the same.

-