5.5. Predicted probabilities (worked example)#

A logistic regression model describes whether the probability of voting for Candidate X in an election depends on
Before we get to python, this exercise is a chance to practice converting logistic regression output into predicted probabilities by hand (i.e., by calculator or in Excel!) to help you see what is going on.
Identify
and interpret its sign
Click to reveal answer
0.03. The estimated probability of voting for Candidate X increases as income increases.
Find the estimated probability of voting for the candidate when income = 10,000.
Click to reveal answer
When we plug in a value of
The alternative equation for logistic regression (derived from the equation above, see lecture slides) that expresses the probability directly is:
Thus
The probability of voting for Candidate X when income = 10,000 (i.e., x = 10) is 0.15, or 15%.
At which income level is the estimated probability for the candidate equal to 0.50?
Click to reveal answer
When
So, we take
We then find that
Thus, for this example,