1.
Suppose a political pundit claims to be able to predict the outcome of elections, but instead of picking a winner, they give each candidate a probability of winning. With that kind of prediction, it can be hard to say whether it is right or wrong.
For example, suppose the pundit says that Alice has a 70% chance of beating Bob, and then Bob wins the election. Does that mean the pundit was wrong?
One way to answer this question is to consider two hypotheses:
-
H: The punditβs algorithm is legitimate; the probabilities it produces are correct in the sense that they accurately reflect the candidatesβ probabilities of winning. -
not H: The punditβs algorithm is bogus; the probabilities it produces are random values with a mean of 50%.
If the pundit says Alice has a 70% chance of winning, and she does, that provides evidence in favor of
H with likelihood ratio 70/50.
If the pundit says Alice has a 70% chance of winning, and she loses, thatβs evidence against
H with a likelihood ratio of 50/30.
Suppose we start with some confidence in the algorithm, so the prior odds are 4 to 1. And suppose the pundit generates predictions for three elections:
-
In the first election, the pundit says Alice has a 70% chance of winning and she does.
-
In the second election, the pundit says Bob has a 30% chance of winning and he does.
-
In the third election, the pundit says Carol has an 90% chance of winning and she does.
What is the log likelihood ratio for each of these outcomes? Use the log-odds form of Bayesβs Rule to compute the posterior log odds for
H after these outcomes. In total, do these outcomes increase or decrease your confidence in the pundit?
If you are interested in this topic, you can read more about it in this blog post.
Solution.
# Solution
prior_log_odds = np.log(4)
prior_log_odds
1.3862943611198906
# Solution
lr1 = np.log(7/5)
lr2 = np.log(3/5)
lr3 = np.log(9/5)
lr1, lr2, lr3
(0.3364722366212129, -0.5108256237659907, 0.5877866649021191)
# Solution
# In total, these three outcomes provide evidence that the
# pundit's algorithm is legitmate, although with K=1.8,
# it is weak evidence.
posterior_log_odds = prior_log_odds + lr1 + lr2 + lr3
posterior_log_odds
1.7997276388772319














