PREFACE: I don't care about the merits of using a cutoff or not, or how one should choose a cutoff. My question is purely mathematical and due to curiosity.

Logistic regression models the posterior conditional probability of class A versus class B and it fits a hyperplane where the posterior conditional probabilities are equal. So in theory, I understood that a 0.5 classification point will minimize total errors regardless of set balance, since it models the posterior probability (assuming you consistently encounter the same class ratio).

In my real life example, I obtain very poor accuracy using P > 0.5 as my classifying cutoff (about 51% accuracy). However, when I looked at the AUC it is above 0.99. So I looked at some different cutoff values and found that P > 0.6 gave me 98% accuracy (90% for the smaller class and 99% for the bigger class) - only 2% of cases misclassified.

The classes are heavily unbalanced (1:9) and it is a high-dimensional problem. However, I allocated the classes equally to each cross-validation set so that there should not be a difference between the balance of classes between model fit and then prediction. I also tried using the same data from the model fit and in predictions and the same issue occurred.

I'm interested in the reason why 0.5 would not minimize errors, I thought this would be by design if the model is being fit by minimizing cross-entropy loss.

Does anyone have any feedback as to why this happens? Is it due to adding penalization, can someone explain what is happening if so?

  • 2
    $\begingroup$ See stats.stackexchange.com/search?q=user%3A4253+cutoff $\endgroup$ Commented Jul 27, 2016 at 12:05
  • $\begingroup$ Scortchi, could you possibly be a bit more specific as to which question about cutoffs you think is relevant? I didn't see the relevant question or answer before I posted, nor now. $\endgroup$
    – felix000
    Commented Jul 27, 2016 at 20:04
  • $\begingroup$ Sorry, I didn't mean they all answered your q., but I thought they were all relevant in suggesting not using accuracy at any cut-off as a performance metric, or at least not an arbitrary cut-off not calculated from a utility function. $\endgroup$ Commented Jul 28, 2016 at 11:04

2 Answers 2


You don't have to get predicted categories from a logistic regression model. It can be fine stay with predicted probabilities. If you do get predicted categories, you should not use that information to do anything other than say 'this observation is best classified into this category'. For example, you should not use 'accuracy' / percent correct to select a model.

Having said those things, $.50$ is rarely going to be the optimal cutoff for classifying observations. To get an intuitive sense of how this could happen, imagine that you had $N=100$ with $99$ observations in the positive category. A simple, intercept-only model could easily have $49$ false negatives when you use $.50$ as your cutoff. On the other hand, if you just called everything positive, you would have $1$ false positive, but $99\%$ correct.

More generally, logistic regression is trying to fit the true probability positive for observations as a function of explanatory variables. It is not trying to maximize accuracy by centering predicted probabilities around the $.50$ cutoff. If your sample isn't $50\%$ positive, there is just no reason $.50$ would maximize the percent correct.

  • 2
    $\begingroup$ Hi, thank you for your explaination , however I don't get the example with the intercept-only model. With the intercept-only model you'll have 0.99 for any examples and therefore you'll have the 99% accuracy by taking any threshold value. $\endgroup$
    – abcdaire
    Commented May 27, 2019 at 14:49
  • $\begingroup$ I don't quite see how this answers the specific question that OP had... Shouldn't cutoff 0.5 roughly maximize the accuracy on the training data to which the logistic regression model is fit? And I agree with @abcdaire that your intercept-only example is unclear. $\endgroup$
    – amoeba
    Commented Nov 30, 2020 at 20:16

I think, it could be because of multiple reasons:

  1. There might be non-linearity in your data, so linearly adding the weights, might not always result in correct probabilities
  2. Variables are a mix of good predictors and weak predictors, so scored population that is around .5 is because of weak predictors or less effect of strong predictors. As you go above, you get people, for whom the effect of predictors is strong

So, you might have to sometime play around with cut-off value, to maximize your desired output like precision,accuracy etc. Because most of the time populations are not very homogeneous.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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