Computing Predicted Probabilities

🧠 Refresher 🧠

Suppose a logistic regression model predicting the probability of acquittal based on a defense attorney’s hourly rate (in dollars) produces the following coefficients:

\[\log\left(\frac{\hat{p}}{1-\hat{p}}\right) = -2.1 + 0.008 \cdot \text{HourlyRate}\]

To get a predicted probability for a specific case, you follow two steps.

Step 1: Plug in \(X\) to get the log odds.

For a defendant whose attorney charges $300/hr:

\[\text{log odds} = -2.1 + 0.008 \times 300 = -2.1 + 2.4 = 0.30\]

Step 2: Convert log odds to a predicted probability.

\[\hat{p} = \frac{1}{1 + \exp(-0.30)} = \frac{1}{1 + 0.741} = \frac{1}{1.741} \approx .57\]

A defendant with an attorney charging $300/hr has a predicted probability of acquittal of approximately .57.


A note on direction of effect

The sign on \(\beta_1\) tells you the direction of the relationship β€” on the log odds scale. A positive coefficient means that as \(X\) increases, the log odds increase, which means the predicted probability of the outcome also increases. A negative coefficient means the reverse.

In the model above, \(\beta_1 = 0.008\) is positive. This means that higher hourly rates are associated with higher predicted probabilities of acquittal. The direction of the effect is the same whether you are thinking in log odds or in probabilities β€” a positive coefficient always moves \(\hat{p}\) upward, and a negative coefficient always moves it downward.


πŸ“ Homework Problems πŸ“

LR.2.1

Using the model below, compute the predicted log odds for a defendant whose attorney charges $500/hr.

\[\log\left(\frac{\hat{p}}{1-\hat{p}}\right) = -2.1 + 0.008 \cdot \text{HourlyRate}\]

Round to two decimal places.


LR.2.2

Using your answer from LR.2.1, convert the log odds to a predicted probability. Round to two decimal places.


LR.2.3

A different model is estimated:

\[\log\left(\frac{\hat{p}}{1-\hat{p}}\right) = 1.4 - 0.003 \cdot \text{HourlyRate}\]

Without doing any calculation, what does the negative sign on \(\beta_1\) tell you?

A. The model failed to converge
B. Higher hourly rates are associated with lower predicted probabilities of acquittal
C. Higher hourly rates are associated with higher predicted probabilities of acquittal
D. The intercept is meaningless


LR.2.4

Using the original model, a researcher plugs in \(X = 0\) (an attorney who charges $0/hr) and gets a log odds of \(-2.1\). They convert this to a predicted probability of approximately .11.

Which of the following is the most accurate interpretation?

A. The model predicts that 11% of all defendants are acquitted
B. A defendant with a $0/hr attorney has a predicted probability of acquittal of .11 according to this model
C. The intercept is statistically significant at \(p < .05\)
D. The model is invalid because no attorney charges $0/hr