Perfect or quasi-complete separation in logistic regression: what it is, its consequences, and how to fix it

Quick Overview

Explain complete and quasi-complete separation in logistic regression, why the maximum-likelihood fit breaks down, and how to address it. Tests your understanding of the likelihood, coefficient and standard error behavior, Wald tests, and how to diagnose the feature behind the problem.

Perfect or quasi-complete separation in logistic regression: what it is, its consequences, and how to fix it

Role: Data Scientist

Category: Machine Learning

Difficulty: hard

Interview Round: Other

What is perfect (or quasi-complete) separation in logistic regression, what are its consequences, and how can it be addressed? ```hint Look at the likelihood Write the log-likelihood for data that a single threshold splits perfectly, and watch what happens to it as the slope increases. ``` ```hint Change the objective Ask what you could add to the objective so that very large coefficients stop paying off. ``` ### What a Strong Answer Covers - Definitions of complete and quasi-complete separation, with a small example of each. - What happens to the maximum-likelihood fit, and what the solver output shows as a result. - The effect on coefficients, standard errors, Wald tests and predicted probabilities. - Ways to fix it and their trade-offs. - How to investigate the feature that causes the separation. ### Follow-up Questions - Why can the most predictive feature show a p-value near 1 under separation, and which test would you use instead? - In a small sample where you need valid inference, which fix would you choose, and how does it keep the estimates finite? - Why does separation become likely when the number of features approaches the number of rows?

Overview: Explain complete and quasi-complete separation in logistic regression, why the maximum-likelihood fit breaks down, and how to address it. Tests your understanding of the likelihood, coefficient and standard error behavior, Wald tests, and how to diagnose the feature behind the problem.

PracHub logo
General
Nov 24, 2026
hardData ScientistOtherMachine Learning
0
0

What is perfect (or quasi-complete) separation in logistic regression, what are its consequences, and how can it be addressed?

What a Strong Answer Covers Guidance

  • Definitions of complete and quasi-complete separation, with a small example of each.
  • What happens to the maximum-likelihood fit, and what the solver output shows as a result.
  • The effect on coefficients, standard errors, Wald tests and predicted probabilities.
  • Ways to fix it and their trade-offs.
  • How to investigate the feature that causes the separation.

Follow-up Questions Guidance

  • Why can the most predictive feature show a p-value near 1 under separation, and which test would you use instead?
  • In a small sample where you need valid inference, which fix would you choose, and how does it keep the estimates finite?
  • Why does separation become likely when the number of features approaches the number of rows?