⏳ Loading example…
⚙️
Logistic
Logistic Regression — Predict Pass/Fail from Study Hours
Binary logistic regression with OR=3.06 (95% CI [1.19, 7.87]). Model χ²=14.5, Nagelkerke R².
📊 OR = 3.06, 95% CI [1.19, 7.87]
Step-by-step solution
⚙️ 15 · Logistic Regression
Predict Student Pass/Fail from Study Hours
Logistic Regression
Research Question:
Does weekly study hours predict the probability of passing (Y=1) vs failing (Y=0) an examination? n=20 students.
Logistic Function — Probability of Success
$$P(\text{pass})=\frac{1}{1+e^{-(b_0+b_1 X)}}=\frac{e^{b_0+b_1 X}}{1+e^{b_0+b_1 X}}$$
-
1MLE estimates (obtained via software):$$b_0=-8.76\;(SE=3.42),\quad b_1=1.12\;(SE=0.48)$$ $$\hat{Y}=\frac{1}{1+e^{-(-8.76+1.12X)}}$$
-
2Predicted probabilities at key values:
Study Hours 6 7 8 9 10 P(pass) .115 .283 .550 .798 .922 $$\text{At }X=8:\quad P(\text{pass})=\frac{1}{1+e^{-(-8.76+8.96)}}=\frac{1}{1+e^{-0.20}}=\frac{1}{1.819}=\mathbf{0.55}$$ -
3Odds Ratio — how much the odds multiply per extra hour:$$OR = e^{b_1} = e^{1.12} = \mathbf{3.06}\quad\text{95% CI: }[1.19,\;7.87]$$ $$\text{Each additional study hour multiplies the odds of passing by 3.06×}$$
-
4Model significance — Omnibus test:$$\text{Overall model: }\chi^2(1)=14.5,\;p<.001,\quad\text{Nagelkerke }R^2=.72$$ $$\text{Wald test: }\chi^2(1)=5.44,\;p=.020\quad\text{(for }b_1\text{)}$$ $$\text{Correctly classified: }85\%$$
3.06
OR
<.001
Model p
.72
Nagelkerke R²
85%
Classified
✅ Study hours significantly predicts pass/fail, OR=3.06 — each additional study hour triples the odds of passing.
APA-7
Logistic regression was performed to examine whether study hours predicted exam outcome. The overall model was significant, χ²(1) = 14.5, p < .001, Nagelkerke R² = .72, correctly classifying 85% of cases. Study hours was a significant predictor, b = 1.12, SE = 0.48, Wald χ²(1) = 5.44, p = .020, OR = 3.06, 95% CI [1.19, 7.87].