logistic regression model to calculate the log odds

90 Views Asked by At

Let’s say that you have estimated the following logistic regression model to calculate the log odds of a $4$ year old child being obese $(y = 1)$ using the independent variable weight in kgs $(x)$:

Log(Odds(x)) $= -2 + 0.15x$

What is the estimated probability of being obese for a 12kg child of the same age group?

2

There are 2 best solutions below

1
On

I am not sure about it but I think that the logistic function is given by:

$P(y = 1) = \frac{1}{1+e^{-(log-odds)}}$

In your case, the log-odds is given by $-2+0.15x$. So, for a 12kg child $(x=12)$, the estimated probability of being obese is: $P(y = 1) = \frac{1}{1+e^{-(-2+0.15(12))}}$

Anyone else think otherwise? I'm not too sure about the logistic function though.

0
On

I think based on your example we have that $(\hat{\beta_0}, \hat{\beta_1})=(-2,0.15)$. Now, you want to classify each subject using the following logistic model.

$$ \hat{P}(y_i=1|kg)=\frac{e^{\beta_0+\beta_1kg}}{1+e^{\beta_0+\beta_1kg}}. $$

Let's take the first subject. He\she is $12$ kg, so by plugging it in the model we get $$ \hat{P}(y_i=1|kg=12)=\frac{e^{-2+0.15\cdot12}}{1+e^{-2+0.15\cdot12}}\approx 0.45, $$ which mean that his/her probability of being obese is $0.45$, and the $\log(odds)$ are $$ \log\left(Odds(x)\right)=-2+0.15x. $$