Calculator Inputs
Example Data Table
This sample uses one predictor and one binary outcome.
| Observation | Predictor X | Outcome Y | Interpretation |
|---|---|---|---|
| 1 | 18 | 0 | No event occurred. |
| 2 | 22 | 0 | No event occurred. |
| 3 | 25 | 0 | No event occurred. |
| 4 | 28 | 0 | No event occurred. |
| 5 | 30 | 1 | Event occurred. |
| 6 | 33 | 0 | No event occurred. |
| 7 | 35 | 1 | Event occurred. |
| 8 | 38 | 1 | Event occurred. |
| 9 | 40 | 0 | No event occurred. |
| 10 | 42 | 1 | Event occurred. |
| 11 | 45 | 1 | Event occurred. |
| 12 | 48 | 1 | Event occurred. |
| 13 | 52 | 1 | Event occurred. |
| 14 | 55 | 1 | Event occurred. |
Formula Used
Simple logistic regression models a binary outcome using one predictor. It estimates the event probability through the logistic curve.
The intercept b0 shifts the curve. The slope b1 controls how strongly the predictor changes the event probability. A positive slope increases odds as the predictor grows. A negative slope decreases them.
How to Use This Calculator
- Enter sample data with one predictor value and one binary outcome per line.
- Use 0 for non-event cases and 1 for event cases.
- Set a target predictor value to estimate a new event probability.
- Choose a threshold for classifying predicted probabilities.
- Adjust iterations or tolerance if you want stricter convergence control.
- Click the calculate button to fit the model.
- Review coefficients, odds ratio, confidence intervals, and accuracy metrics.
- Download CSV or PDF copies of the displayed results when needed.
Frequently Asked Questions
1. What does simple logistic regression estimate?
It estimates the probability of a binary outcome from one predictor. The output stays between 0 and 1, so it works well for yes-or-no events.
2. Why must the outcome be only 0 or 1?
This model is built for binary classification. A value of 0 means the event did not occur, while 1 means it did occur.
3. What does the slope coefficient mean?
The slope shows how the predictor changes the log-odds of the event. When the slope is positive, higher predictor values raise the event probability.
4. What is the odds ratio?
The odds ratio is exp(b1). It tells how many times the event odds change for a one-unit increase in the predictor.
5. What does the threshold control?
The threshold converts probabilities into class labels. A threshold of 0.50 predicts class 1 only when the estimated probability is at least 50 percent.
6. Why can perfect separation be a problem?
Perfect separation happens when one predictor cut perfectly splits both classes. Coefficients can grow very large, which makes stable estimation difficult.
7. What does pseudo R² represent?
Pseudo R² compares the fitted model with a null model. Larger values usually suggest a better improvement in fit, but interpretation differs from linear regression R².
8. Can I use this for multiple predictors?
No. This page is designed for one predictor only. For multiple predictors, you would need a multivariable logistic regression model.