What’s the difference between Linear and Logistic Regression?

Question is closed for new answers.

Team Selected answer as best 6 days ago

**Nature of Dependent Variable**:- Linear regression is used when the dependent variable is continuous while logistic regression is used when the dependent variable is binary (two categories).

**Output**:- In linear regression, the output is continuous and can take any value, while in logistic regression, the output is a probability between 0 and 1.

**Assumption**:- Linear regression assumes a linear relationship between the dependent and independent variables, while logistic regression does not assume linearity.

**Model**:- Linear regression uses a linear model to fit the data, while logistic regression uses a logistic function to model the probability of the dependent variable.

**Error Function**:- In linear regression, the error function is based on the difference between the predicted and actual values, while in logistic regression, the error function is based on the maximum likelihood estimation.

**Interpretation of Coefficients**:- In linear regression, the coefficients represent the change in the dependent variable associated with a one-unit change in the independent variable, while in logistic regression, the coefficients represent the change in the log-odds of the outcome associated with a one-unit change in the independent variable.

**Goodness of Fit**:- In linear regression, goodness of fit is often measured using metrics like R-squared, while in logistic regression, metrics like the likelihood ratio test or the AIC are used to assess model fit.

**Usage**:- Linear regression is commonly used for predicting continuous outcomes like sales, temperature, etc., while logistic regression is used for predicting binary outcomes like yes/no, pass/fail, etc.

**Outliers**:- Linear regression is sensitive to outliers, which can skew the results, whereas logistic regression is less affected by outliers due to the logistic function used.

**Decision Boundary**:- In logistic regression, there is a decision boundary that separates the two classes, while in linear regression, the line can extend beyond the range of the data points.

Team Selected answer as best 6 days ago