What is worst than a random, in ROC then say lower-right space is worst than random Nothing can be worst than random, if you are predicting wrong all the time then why don't you just invert your results all the time and then you will be in the upper-left area of the ROC curve i.e. above the diagonal line. Can you explain that?
 A: *

*Yes, a model can actually perform worse than random.
Typical situations where this happens are when the training data differs systematically from the application/production/test data. E.g. 


*

*training was done with lab-generated data, whereas application/test data comes from [industrial] production line.

*training data was curated: e.g. only cases where reference labels are easily obtained were used, but in reality borderline cases are frequent. Or training dat has been oversampled "to avoid class imbalance" - but the class imbalance was a characteristic of the application.

*Leave-one-out cross validation produces a situation where the tested case's class is always underrepresented in the respective surrogate training set. The result is a pessimistic bias.  

*Sometimes I deliberately test edge-cases because I want to know how far I can push the model until its predictive power breaks down.


*Flipping prediction "because test results were worse-than-guessing" is part of model training: with the option to flip if test results are too bad you introduced a hyperparameter that says whether a flipping postprocessing of the predictions should be applied. Thus, your test set is actually a hyperparameter optimization set (often referred to as validation set), and not any more an independent test of generalization error.
So, yes, you can do that, but in order to measure generalization error, you now need another independent test set to see how well your flipped predictions are doing.
A: Here is an example of flipping the prediction:
Suppose we want to classify cats and dogs by weights. And the classifier is a simple rule: if an animal's weight is larger than 2kg, then it is a dog.
Suppose we are getting an ROC curve that is worse than random, then we just need to change our rule to be: if an animal's weight is larger than 2kg, then it is a cat.
A: If you always guess at random, then sometimes you will perform above chance and sometimes bellow chance, although at average, in the long run, you will converge to random performance. If you always flip the results when it is convenient, then it would look like you learned something about the problem, although you are still just making random predictions. It's head I win, tail you lose situation. 
You can flip your predictions, but you would have to do it fairly. So you will have to decide to flip them before you know which way is better for your test set, for example, based on an additional nested CV loop. 
It is very easy to get significant bellow chance predictions without learning anything about the data, thus just flipping the projections will lead to spurious results. Imagine you want to predict Y based on X, in your dataset, there is a 0 correlation between Y and X, now you split it randomly to a training set and test set. If in training set the correlation between X and Y is positive, then in the test set it will be negative and vice versa (since int he whole dataset it is exactly 0). Therefore, you will always be predicting the relationship in the opposite direction. However, you didn't learn anything about the data, and the true relationship is 0.
