I have the following probability function:

$$\text{Prob} = \frac{1}{1 + e^{-z}}$$


$$z = B_0 + B_1X_1 + \dots + B_nX_n.$$

My model looks like

$$\Pr(Y=1) = \frac{1}{1 + \exp\left(-[-3.92 + 0.014\times(\text{gender})]\right)}$$

I understand what the intercept (3.92) means, but I'm now sure how to interpret 0.014. Are these still log odds, odd ratios, or can I now assert that for each incremental odds change is gender, females are 0.014 more likely to win than men. Basically, how am I to interpret the 0.014?

Basically, I want to take the probability function and actually implement it in Java for a specific program that I'm writing, but I'm just not sure if I'm understanding the function correctly to implement it in Java.

Java code example:

double p = 1d / (1d + Math.pow(2.718d, -1d * (-3.92d + 0.014d * bid)));

If you're fitting a binomial GLM with a logit link (i.e. a logistic regression model), then your regression equation is the log odds that the response value is a '1' (or a 'success'), conditioned on the predictor values.

Exponentiating the log odds gives you the odds ratio for a one-unit increase in your variable. So for example, with "gender", if Female = 0 and Male = 1 and a logistic regression coefficient of 0.014, then you can assert that the odds of your outcome for men are exp(0.014) = 1.01 times that of the odds of your outcome in women.

| cite | improve this answer | |
  • 5
    $\begingroup$ Shouldn't it be "the odds of your outcome for men are exp(0.014) = 1.01 times that of the odds of your outcome in women", since female is 0 and male is 1? $\endgroup$ – Bustic01 Jan 7 '19 at 5:39

the odds ratio of women should be 1 / exp(0.014)


since the event for male is '1' and female is '0' that means the reference level is female.

the equation ln(s) = B0 + B1*(gender)

odds(female) = exp(B0)
odds(male)   = exp(B0 + B1 * 1)

odds ratio(male) = odds(male) / odds(female) = exp(0.014) = 1.01

therefore, odds ratio(female) = 1 / 1.01 = 0.99

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.