Exchange the x-axis and y-axis in order to flip ROC curve I have a continuous variable X and a binary response outcome D.
The ROC curve I got for D with respect to X is below the diagonal line, as shown in the following picture.
In this ROC curve, the true positive rate(y-axis) is defined as P{X>c|D=1}, and the false positive rate(x-axis) is P{X>c|D=0}.
I want to flip the ROC curve. The true positive rate should be changed to P{X>c|D=0}, and the false positive rate should be changed to P{X>c|D=1}.
Could I exchange the x-axis and y-axis in order to flip the ROC curve?


NO
The area under the ROC curve is related to the separation between the predicted outputs, often probability values.
If you just swap the group labels, you do not affect the separation, so the area under the ROC curve should be the same. However, flipping the axes changes the area under your curve.
