4.2 The High/Low Deck Game
In this example we use a simple card game as a platform for discussing model comparison in general. We start with two atypical decks of cards called the High Deck and the Low Deck (Figures 4.1 on page 96 and 4.2 on page 96 respectively). The game goes as follows.
What does our intuition say?
We start by exploring our intuitions, before we do anything mathematically. Thus, we are in a position to check to see if the math is reasonable before we use the same math in areas where our intuition is not as strong. Imagine we draw only one card, and it is a 9. Intuition suggests that this constitutes reasonably strong evidence toward the belief that we're holding the High Deck. If we then (as the procedure states) place the 9 back in the deck, reshuffle and then draw a 7 we can be more strongly convinced that we are holding the High Deck. Repeating the reshuffle, and then drawing a 3 would make us a little less confident in this conclusion, but still quite certain. In this way we can sense how drawing different cards pushes our belief around, depending on how often that card comes up in the different decks.
Before the data - the prior
Before we take any data, we need to quantify our state of knowledge concerning all of the models that we are considering. In this case it is quite simple, because there are two models (High Deck and Low Deck), and we have been given no information about whether either is more common. With no such information, it is equivalent to a coin flip - we assign equal probabilities to both models before we see data, also known as the prior probabilities.
Note
The prior is sometimes mischaracterized as simply our guess, or some other completely subjective assessment of our knowledge. In fact in this example, and many others, we can make the positive case for equal probabilities given the state of our knowledge. This can be quantified with the concept of entropy, which is beyond this chapter.
Surely this assessment will change after we see data, but that is the rest of the problem.
The “easy” question - the likelihood
Although our ultimate goal is to infer the type of deck from the cards that we draw from it, we can start looking at an easier part of this question which serves as a first step toward the more challenging, and interesting goal. That question is the following,
Example 1 What is the probability of drawing a 9, given that we know that we're holding the High Deck?
Show solution
This related question is written
where means that we have observed (i.e. drawn) one 9. This question is “easy” in the sense that it is simply related to the properties of the High Deck: the number of 9's and total number of cards. If you know that you have the high deck, then you know there are nine 9's in that deck out of 55 cards, and thus we have the probability of drawing one 9, given that we are holding the High Deck, is
We give this the name likelihood, and is simply the probability that the data could be the result of a known model. It is also the first part of the top of Bayes' Rule, Equation 1.14 on page 47.
Note
The term likelihood is a poorly chosen word. In English, this word is nearly synonymous with the word probability and thus easily leads to confusion. We could try to use a different term, like consequent probability or generative likelihood to stress the idea that the likelihood is the probability that the data we observe could be generated or could be a consequence of the particular model. However, we'd be going up against two centuries of continued use of the term likelihood and thus would probably increase confusion rather than decrease it.
Applying the Bayes' recipe
Here we introduce for the first time a recipe we will follow for all model comparison examples.
Now that we have our intuition, and we have the likelihoods, we can address the math. The two models are:
and the initial data is
According to Equation 4.1 on page 95 we are looking for the two probabilities:
which are related to the prior and the likelihood via Bayes' Rule (Equation 1.14):
To calculate actual numbers, we apply the Bayes' Recipe to this problem,
- Specify the prior probabilities for the models being considered
- Write the top of Bayes' Rule for all models being considered
where we are using the symbol to denote proportionality or related to. Essentially, by calculating the top of Bayes' Rule first, the numbers are not equal to the final (i.e. posterior) probabilities but must be rescaled to make sure that they add up to 1. This is done in the final step. Up until that rescaling, we use the symbol and think of it as related to.
- Put in the likelihood and prior values
- Add these values for all models
- Divide each of the values by this sum, , to get the final probabilities
From which we can conclude that drawing a 9 does indeed constitute reasonably strong evidence toward the belief that we're holding the High Deck - the probability of us holding the High Deck, given the data, is 0.82.
Drawing the next card
So, when we draw a 7 next (after reshuffling), our intuition suggests that we'd be more confident that we're holding the High Deck. Repeating our recipe we have
The two models are:
and data is
According to Equation 4.1 we are looking for the two probabilities:
which are related to the prior and the likelihood via Bayes' Rule (Equation 1.14):
To calculate actual numbers, we apply the Bayes' recipe to this problem,
- Specify the prior probabilities for the models being considered
- Write the top of Bayes' Rule for all models being considered
- Put in the likelihood and prior values
Note
As a reminder, we are performing this next draw having shuffled the first draw back into the deck. Although somewhat artificial, it is useful for a later example. If we had simply set the first card asside, the value of the likelihood would account for the removal of one more card, and would thus be for the high deck and for the low deck. Note the denominators.
- Add these values for all models
- Divide each of the values by this sum, , to get the final probabilities
which again matches our intuition - we're more confident that we're holding the High Deck, now with probability 0.889 increased from 0.82 when we just observed the 9.
Prior information or not?
In the above example, we started with a prior probability of holding the High Deck at , because we had no information other than that there were two possibilities. We then observed a 9, and updated the probability to 0.82, and then observed a 7, and further updated the probability to 0.889 - making it more likely that we were holding the High Deck. One of the basic tenets of probability theory is that if there is more than one way to arrive at an answer, one should arrive at the same answer. In the above, we calculated the probability of holding the High Deck given the observed data
Note
E. T. Jaynes uses the principle that “if there is more than one way to arrive at an answer, one should arrive at the same answer” to help derive the rules of probability from first principles. Failures of this principle result in paradoxes. This principle is also applied in Section 2.5 for the birthday problem.
and prior information
An equivalent situation is found after our first draw, after we've observed the 9, and we're about to draw our second card. In this case we have the prior information:
and observed data:
Mathematically, we apply the Bayes' recipe, but with the different prior information
- Specify the prior probabilities for the models being considered
- Write the top of Bayes' Rule for all models being considered
- Put in the likelihood and prior values
- Add these values for all models
- Divide each of the values by this sum, , to get the final probabilities
yielding the same result.
In other words our updated probabilities from the first draw can be seen as our prior probabilities for the subsequent draws. Thus, Bayes' Rule describes how we update our knowledge with new evidence, or in other words, learning.
Adapted from Statistical Inference for Everyone, by Brian Blais (Bryant University), licensed under CC BY-SA 4.0 (dual-licensed under the GNU FDL 1.2 or later; this adaptation uses the CC BY-SA grant). Changes were made; this adaptation is distributed under the same license. License: CC-BY-SA-4.0.