# Why do we choose thresholds for the logistic regression instead of sampling from a Bernoulli with p (output of the LR) probability?

I would like to know what would be the disadvantages of sampling from a Bernoulli with p probability (p being the output of a logistic regression) to generate the binary classification?

Choosing a threshold to classify the logistic regression output probability p seems to be the most common approach. I can understand that using ROC to choose a threshold, for example, might help with reasoning about false positive and false negative rates.

Thank you in advance for our help.

• What happens when you get unlucky and sample an unlikely outcome? Imagine predicting a probability of death of $0.99$ (say getting lost in the Sahara Desert), only to sample the less likely (but still possible) "survival" event (Mauro Prosperi), and acting as if the action is one that should lead to survival. $//$ There are plenty of issues with setting thresholds and classifying based on those thresholds (Harrell's blog discusses these here and here), but an upside is that it is deterministic.
– Dave
Commented Oct 4, 2023 at 20:24
• I think I would like to flip this around and ask what you see as the advantage of sampling in this way.
– Dave
Commented Oct 4, 2023 at 20:26

Imagine, instead, that you have access to demographic information (age, sex, number of fitness influencers they are subscribed to, etc) about the users of a website and you would like to decide which version of an advertisement to show them. You will either show them a "funny" version or a "serious" version. In this case it might not be a bad idea to show them one version or the other with probability $$p$$ generated by the model. A nice feature of doing this is that you will show people the version of the ad you think they will click on, but you are still generating A/B testing data to address model drift over time.