I'm taking a more "applied" view here:
Normal (OLS) regression is linear and can take on any value for the predicted dependent variable $\hat{y}$.
In contrast, Logit (via the logistic link function) restricts the outcome to $\hat{y} \in [0,1]$.
This is a desireable property as you can interpret the predicted values directly as a probability. In fact, classification is done by splitting predictions at $0.5$.
Here is a little illustration in R:
# Fake Data
df1=data.frame(rep(1,1000),sample(0:30,1000,rep=TRUE))
df2=data.frame(rep(0,1000),sample(20:100,1000,rep=TRUE))
colnames(df1)<-c("y", "x")
colnames(df2)<-c("y", "x")
df=rbind(df1,df2)
# Linear Model
ols = lm(y~x, data=df)
ols_preds=predict(reg,newdata=df)
# Plot
plot(df$x, ols_preds, type="p")
lines(df$x, df$y, type="p",col="red")
# Logit
logit = glm(y ~ x, data = df, family = "binomial")
logit_preds=predict(logit,newdata=df,type = "response")
# Plot
lines(df$x, logit_preds, type="p",col="blue")
Result:
In the plot below,
- red are original data,
- black are predicted values from the linear (OLS) model, and
- blue are the predicted values from the Logit.
As you can see, OLS "overshoots". It can predict "probabilities" below 0 or above 1 and it does predict a probability of "below 0" in this example.
You can also see that OLS (assuming we "split" classes at 0.5) does not produce a very good split. The reason is that my data $x$ for class $y=0$ is in a range between 0 and 30, while for $y=1$ it is in a range between 20 and 100. So the "skewed" $x$'s also lead to a bad split under OLS.
Logit in contrast splits at a lower $x$ value compared to OLS, which is desireable since this split comes closer to the true classes.
This ultimately come from the objective function. It is different for Logit compared to OLS (in which simply the sum of squared residuals is minimised). Logit looks at "log odds" that some observation belongs to class $y$. So a very different perspective on $y$.
