Logistic regression is a statistical method that we use to fit a regression model when the response variable is binary.
This tutorial shares four different examples of when logistic regression is used in real life.
Logistic Regression Real Life Example #1
Medical researchers want to know how exercise and weight impact the probability of having a heart attack. To understand the relationship between the predictor variables and the probability of having a heart attack, researchers can perform logistic regression.
The response variable in the model will be heart attack and it has two potential outcomes:
- A heart attack occurs.
- A heart attack does not occur.
The results of the model will tell researchers exactly how changes in exercise and weight affect the probability that a given individual has a heart attack. The researchers can also use the fitted logistic regression model to predict the probability that a given individual has a heart attacked, based on their weight and their time spent exercising.
Logistic Regression Real Life Example #2
Researchers want to know how GPA, ACT score, and number of AP classes taken impact the probability of getting accepted into a particular university. To understand the relationship between the predictor variables and the probability of getting accepted, researchers can perform logistic regression.
The response variable in the model will be “acceptance” and it has two potential outcomes:
- A student gets accepted.
- A student does not get accepted.
The results of the model will tell researchers exactly how changes in GPA, ACT score, and number of AP classes taken affect the probability that a given individual gets accepted into the university. The researchers can also use the fitted logistic regression model to predict the probability that a given individual gets accepted, based on their GPA, ACT score, and number of AP classes taken.
Logistic Regression Real Life Example #3
A business wants to know whether word count and country of origin impact the probability that an email is spam. To understand the relationship between these two predictor variables and the probability of an email being spam, researchers can perform logistic regression.
The response variable in the model will be “spam” and it has two potential outcomes:
- The email is spam.
- The email is not spam.
The results of the model will tell the business exactly how changes in word count and country of origin affect the probability of a given email being spam. The business can also use the fitted logistic regression model to predict the probability that a given email is spam, based on its word count and country of origin.
Logistic Regression Real Life Example #4
A credit card company wants to know whether transaction amount and credit score impact the probability of a given transaction being fraudulent. To understand the relationship between these two predictor variables and the probability of a transaction being fraudulent, the company can perform logistic regression.
The response variable in the model will be “fraudulent” and it has two potential outcomes:
- The transaction is fraudulent.
- The transaction is not fraudulent.
The results of the model will tell the company exactly how changes in transaction amount and credit score affect the probability of a given transaction being fraudulent. The company can also use the fitted logistic regression model to predict the probability that a given transaction is fraudulent, based on the transaction amount and the credit score of the individual who made the transaction.