Independence gives the log-likelihood
Differentiating yields the score equations
When a finite maximum-likelihood estimator exists, multiplying these equations by gives
The qualification about a finite estimator matters under complete separation in logistic regression, where coefficient estimates can escape to infinity.
The successful hard-margin fit proves that the transformed observations are separable. This creates complete separation in unpenalized logistic regression: scaling a separating coefficient vector continually raises the likelihood, so no finite maximum-likelihood estimate exists. The nearly singular observed information produces the enormous reported standard errors.
A ridge-penalized logistic regression, or equivalently a Bayesian logistic model with a proper Gaussian prior, gives finite, stable coefficients. Firth bias reduction is another standard remedy.
A binary logistic regression sets
and classifies by the sign of . Its unpenalized maximum-likelihood estimator minimizes the empirical logistic loss
The plotted data are complete separation data: there is a vector with every signed margin . For every finite , increasing strictly decreases each term of , and as . No finite parameter attains zero, so the unpenalized optimization has no solution.
Adding an penalty with , constraining , or using a finite stopping rule makes the problem attain a finite approximate solution. The penalized option is preferable because cross-validation can select the strength of regularization.