Calculator Inputs
Example Data Table
| Observation | Study Hours | Missed Classes | Practice Score | Predicted Probability | Observed Outcome |
|---|---|---|---|---|---|
| 1 | 2.4 | 1.3 | 3.1 | 0.8365 | 1 |
| 2 | 1.8 | 2.4 | 2.2 | 0.5592 | 1 |
| 3 | 0.9 | 3.6 | 1.7 | 0.2078 | 0 |
| 4 | 3.2 | 0.5 | 3.8 | 0.9377 | 1 |
| 5 | 1.1 | 2.8 | 1.4 | 0.2894 | 0 |
Use these sample values to test probability estimation, threshold tuning, and model evaluation metrics.
Formula Used
The calculator uses the logistic regression equation:
z = b0 + b1x1 + b2x2 + b3x3 + b4x4 + b5x5
p = 1 / (1 + e^(-z))
Here, z is the linear predictor and p is the event probability. Odds are calculated as p / (1 - p). Each odds ratio equals e^(beta). Confidence intervals use e^(beta +/- 1.96 x SE). Z scores equal beta / SE, and two-sided p values come from the standard normal distribution.
How to Use This Calculator
- Enter the intercept, predictor names, coefficient values, predictor values, and standard errors.
- Set a classification threshold between 0.01 and 0.99.
- Optionally choose the actual outcome for a quick prediction check.
- Enter confusion matrix counts to evaluate model performance.
- Press Calculate Logistic Regression to show results above the form.
- Review the contribution table, coefficient diagnostics, and performance metrics.
- Use the export buttons to download the visible results as CSV or PDF.
Frequently Asked Questions
1. What does logistic regression predict?
It predicts the probability of a binary outcome, such as yes or no, pass or fail, or default versus non-default.
2. What is the linear predictor?
The linear predictor is the weighted sum of the intercept and all predictor contributions. It is also called the log-odds or logit.
3. Why are odds ratios useful?
Odds ratios show how the odds change for a one-unit increase in a predictor, holding the other predictors constant.
4. What does the threshold change?
The threshold changes when a predicted probability becomes class 1. Lower thresholds increase positives, while higher thresholds increase negatives.
5. How are p values estimated here?
P values are estimated from each coefficient’s z score using the standard normal distribution. They help assess predictor significance.
6. Can I use more than three predictors?
Yes. The tool supports five predictors plus an intercept, which is enough for many instructional and planning scenarios.
7. What do confusion metrics tell me?
They summarize classification quality. Accuracy measures overall correctness, while precision, recall, specificity, and F1 explain different error patterns.