Score → probability → decision

A logistic model first adds up evidence, then turns that score into a chance between 0 and 1. You choose the chance required to predict “yes.”

Problem 5 supplies the fitted coefficients −6, 0.05 and 1, plus the student with 40 study hours and GPA 3.5. The adjustable decision threshold is an extra demonstration.

1. Add the score

The score z can be any number.

z = −6 + 0.05h + 1g

2. Squash into a chance

The sigmoid gives p, the model’s estimated chance of an A.

p = 1 / (1 + e−z)

3. Choose yes or no

Predict an A if p ≥ t; otherwise predict no A. The tie goes to “A” here.

The curve changes a score into a chance

SigmoidDecision threshold
Sigmoid probability curve

Odds compare “A” with “no A.”

odds = p / (1 − p) = ez

Here e ≈ 2.718, and exp(a) means e raised to power a. Moving the threshold changes the decision; it does not change this student’s estimated probability.