Login
📚 Statistical Inference for Everyone
Chapters ▾

6.2 Bent Coins

Schematic side view of two coins bent by different amounts. The left coin is bent into a shallow arc and labelled 'slightly bent, P(heads) approximately 0.5'; the right is folded almost in half and labelled 'folded in half, P(heads) tends to 0 or 1'. The figure illustrates that bending a coin changes how often it lands heads.
Figure 6.1. Bent Coins

Imagine we have a series of coins bent by various amounts (Figure 6.1). If the coin is bent completely in half, then we could have the coin always flip heads (i.e. P(heads)=1) or tails (i.e. P(tails)=1) depending on how it is bent. If you don't bend the coin at all then we'd have a fair coin (P(heads)=P(tails)=0.5). So, let's say that we have a collection of bent coins which are bent by different amounts. For convenience we will number them from 0 to 10. The Table 6.1 summarizes the probability of each coin flipping heads.

Table 6.1. Probabilities for flipping heads given a collection of bent coins
Coin NumberProbability for Flipping Heads (P(heads))
00.0
10.1
20.2
30.3
40.4
50.5
60.6
70.7
80.8
90.9
101.0

Now I have the following scenario1, with a few questions.

The way we've set up this problem is exactly like the model comparison example with the High and Low Deck (Section 4.2), except in this case we have 11 models (one for each coin). Applying the Bayes' Recipe we have

  1. Specify the prior probabilities for the models being considered. Given no further information, we select a uniform distribution for the prior (i.e. all models are initially equally probable):

    P(M0)=1/11P(M1)=1/11P(M10)=1/11.

    where M0 is the model defined by “we're flipping coin 0,” M1 is the model defined by “we're flipping coin 1,” etc...

  2. Write the top of Bayes' Rule for all models being considered:

    P(M0|data=9T,3H)P(data=9T,3H|M0)P(M0)P(M1|data=9T,3H)P(data=9T,3H|M1)P(M1)P(M10|data=9T,3H)P(data=9T,3H|M10)P(M10).

  3. Put in the likelihood and prior values. Here we are drawing from a binomial distribution for the likelihood:

    P(M0|data=9T,3H)(123)0.03×(10.0)9×1/11P(M1|data=9T,3H)(123)0.13×(10.1)9×1/11P(M10|data=9T,3H)(123)1.03×(11.0)9×1/11.

  4. Add these values for all models: see Table 6.2.
  5. Divide each of the values by this sum, K, to get the final probabilities: see Table 6.2.
Table 6.2. Probability for different bent-coin models, given the data=9 tails, 3 heads. The middle column is the non-normalized value from Bayes' Rule, needing to be divided by K (the sum of the middle column) to get the final column which is the actual probability.
Model P ( M i | d a t a = 9 T , 3 H ) P ( M i | d a t a = 9 T , 3 H ) / K
M 0 0.0000.000
M 1 0.007740.110
M 2 0.02140.306
M 3 0.02170.310
M 4 0.01280.184
M 5 0.004880.0696
M 6 0.001130.0161
M 7 0.0001350.00192
M 8 0.000005240.0000748
M 9 0.00000001450.000000208
M 10 0.0000.000
K=0.0700

When we are dealing with this many models, it is easier to plot the results, shown in Figure 6.2. We are now in a position to address the questions posed at the beginning of the section.

Dotted line plot of the posterior probability of each bent-coin model 0-10 given 9 tails and 3 heads. The probability is zero for models 0 and 10, peaks at about 0.31 for models 2 and 3, and falls to nearly zero beyond model 6.
Figure 6.2. Probability for different bent-coin models, given the data=9 tails, 3 heads.
  1. From this data, which coin do I most likely have?

    The maximum probability is for coin 3, but coin 2 is a close second. Thus we can be reasonably confident that we have been flipping one of those two coins, but can't narrow our confidence any more than that.

  2. Can we be significantly confident that this particular coin will result in more tails than heads in the future?

    This is another way of asking for the total probability for coins less than coin 5 (the fair coin), or

    P(coin 0 or coin 1 or coin 2 or coin 3 or coin 4)=0.000+0.110+0.306+0.310+0.184=0.912

    which says that this coin is “likely” to “very likely” (Table 1.1 on page 51) to have a probability of yielding heads less than a fair coin, and thus yield more tails in the future.

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.