Why can logistic regression give speed a large coefficient even when speed makes no difference to its predictions? Suppose we’re predicting whether a car crash was fatal. We accidentally give the model two features for speed at impact: x in kilometres per hour and y in miles per hour. There’s only one measurement here. Somebody just converted its units.
Let’s use 1.61 as the conversion factor for this example. If a row says 50 mph, the other column says 80.5 km/h. Logistic regression gives each column a coefficient, or weight, and multiplies the reading by that weight. It adds those contributions to the rest of the score before converting the score into a probability.
Since x = 1.61 × y, this equals (1.61 × W₁ + W₂) × y.
Now suppose, just for this thought experiment, that speed tells us nothing about whether a crash was fatal. You might expect both speed coefficients to be zero. That works. But look at three ways the model could score that same row:
The first pair ignores both columns. The second looks as if it gives speed a positive weight in kilometres and a negative weight in miles. The third reverses the signs and makes the weights much larger. Yet all three leave the predicted probability unchanged.
What if speed does help predict fatality? Start with any pair of weights that fits the data. Add one to the weight on kilometres per hour and subtract 1.61 from the weight on miles per hour. The first change adds x points to the score; the second takes away exactly x points. You’ve changed both coefficients without changing a single prediction.
That’s the distinction: the data can tell us whether the prediction changes with speed. They can’t tell us how to split that change between two columns recording the same thing. Infinitely many pairs of coefficients describe the same model on these inputs. That means we have a model for predicting the outcome, but not a unique set of weights. Different weight combinations give the same result, so we can’t tell how important either speed column is on its own. That’s a broken model.
Speedometer example adapted from hdkrgr’s answer on Cross Validated, CC BY-SA 4.0.