Binary or Continuous? A Comparative Analysis of Logistic and Linear Regression

btd
3 min readNov 16, 2023

Logistic regression and linear regression are both techniques used for modeling relationships between variables, but they are suited for different types of problems. Here are the key differences between logistic regression and linear regression:

1. Type of Dependent Variable:

Linear Regression:

  • Linear regression is used when the dependent variable is continuous and follows a normal distribution.
  • Examples include predicting house prices, temperature, or stock prices.

Logistic Regression:

  • Logistic regression is used when the dependent variable is binary (two classes: 0 or 1) or categorical.
  • Examples include predicting whether a student passes or fails an exam, whether a customer buys a product or not.

2. Output Type:

Linear Regression:

  • The output of linear regression is a continuous value. It predicts a quantity that can range from negative to positive infinity.

Logistic Regression:

  • The output of logistic regression is a probability, typically between 0 and…

--

--

btd
btd

No responses yet