Mathematics
Logistic Regression for Binary Outcomes
Quick fact
Logistic regression doesn't fit a line to the data; it fits an S-shaped curve that always stays between 0 and 1. This curve is the logistic function, and the model estimates the probability of an event, such as tumor malignancy, based on features like tumor size or age.
Why this is interesting
You have a dataset of patients with a tumor: benign or malignant. Can a straight line predict the chance of cancer? And what if the line predicts a probability of 1.2—impossible! How do we fix that?