# 4.4 Logistic Regression

The model has the form (4.17):
$$
\begin{equation}
\log \cfrac{Pr(G = 1 | X = x)}{Pr(G = k | X =x)} = \beta_{10} + \beta_1^Tx\\
\log \cfrac{Pr(G = 2 | X = x)}{Pr(G = k | X =x)} = \beta_{20} + \beta_2^Tx\\
\vdots\\
\log \cfrac{Pr(G = K-1 | X = x)}{Pr(G = k | X =x)} = \beta_{(K-1)0} + \beta_{K-1}^Tx\\
\end{equation}
$$

The model is specified in terms of K - 1 log-odds or logit transformations. A simple calculation shows that (4.18):
$$
\begin{equation}
Pr(G=k|X=x) = \cfrac{exp(\beta_{k0} + \beta_k^Tx)}{1+\sum_{l=1}^{K-1}exp(\beta_{l0} + \beta_l^Tx)},
k = 1,...,K - 1,\\
Pr(G=K|X=x) = \cfrac{1}{1+\sum_{l=1}^{K-1}exp(\beta_{l0} + \beta_l^Tx)}
\end{equation}
$$

and they clearly sum to one.

f2a897234262d3f135ab07b414e0919054c5519e
ipynb
Jupyter Notebook
chapter-04/4.4-logistic-regression.ipynb
leduran/ESL
fcb6c8268d6a64962c013006d9298c6f5a7104fe
MIT
2019-01-28T14:05:02.000Z
2022-03-27T00:11:21.000Z
chapter-04/4.4-logistic-regression.ipynb
leduran/ESL
fcb6c8268d6a64962c013006d9298c6f5a7104fe
MIT
2020-07-06T16:51:40.000Z
2020-07-06T16:51:40.000Z
chapter-04/4.4-logistic-regression.ipynb
leduran/ESL
fcb6c8268d6a64962c013006d9298c6f5a7104fe
MIT
2019-03-21T23:48:35.000Z
2022-03-31T13:05:10.000Z
Qwen/Qwen-72B
1. YES
2. YES