This Logistic Regression Calculator helps you analyze binary outcome data and make classifications or predictions. It fits data to the model , providing comprehensive analysis including model coefficients, odds ratios, and performance metrics. Logistic regression is widely used in various fields including medicine (disease diagnosis), marketing (customer conversion), and finance (credit scoring). You can analyze both simple and multiple logistic regression models with one or more predictor variables. To learn about the data format required and test this calculator, click here to populate the sample data.
Calculator
1. Load Your Data
2. Select Columns & Options
Related Calculators
Learn More
Logistic Regression
Definition
Logistic Regression is a statistical method used to model the probability of a binary outcome based on one or more predictor variables. Unlike linear regression, logistic regression models the log-odds of an event as a linear combination of predictors, which constrains the predicted probabilities between 0 and 1.
Key Formulas for One Predictor
Logistic Model (Probability):
Logit Transformation (Log-odds):
Odds Ratio:
Decision Boundary (for classification):
where c is the probability cutoff (typically 0.5)
Key Formulas for Multiple Predictors
Logistic Model (Probability):
Logit Transformation (Log-odds):
Odds Ratio:
For the i-th predictor, representing the change in odds when increases by one unit, holding other predictors constant
Decision Boundary (for classification):
where c is the probability cutoff (typically 0.5)
(simplified for c = 0.5)
Key Assumptions
Practical Example of Logistic Regression with One Predictor
Step 1: Data
Consider a dataset of student exam scores and admission outcomes (1 = admitted, 0 = rejected):
Exam Score (X) | Admitted (Y) |
---|---|
35 | 0 |
42 | 0 |
57 | 0 |
⋮ | ⋮ |
78 | 1 |
93 | 1 |
Step 2: Fit Logistic Regression Model
After fitting a logistic regression model, we get:
Step 3: Interpret the Coefficients
The coefficient β₁ = 0.15 means that for each one-point increase in exam score, the log-odds of admission increase by 0.15.
Converting to odds ratio: OR = e^0.15 = 1.16
This means that for each one-point increase in exam score, the odds of admission increase by 16%.
Step 4: Calculate Probability for a New Student
For a student with an exam score of 70:
This student has a 45% probability of being admitted.
Step 5: Find the Decision Boundary
At what exam score is the probability of admission exactly 0.5?
Students scoring above 71.2 are more likely to be admitted than rejected.
Performance Metrics
A table comparing actual vs. predicted classifications:
Actual Positive | Actual Negative | |
Predicted Positive | True Positive (TP) | False Positive (FP) |
Predicted Negative | False Negative (FN) | True Negative (TN) |
Proportion of correct predictions: (TP + TN) / (TP + FP + FN + TN)
Proportion of actual positives correctly identified: TP / (TP + FN)
Proportion of actual negatives correctly identified: TN / (TN + FP)
Measures the model's ability to distinguish between classes; ranges from 0.5 (no discrimination) to 1 (perfect discrimination)