Bayes' Theorem Math Example 4

Follow the full solution, then compare it with the other examples linked below.

Example 4

hard
A coin is either fair (p=0.5p=0.5, probability 0.7) or biased (p=0.8p=0.8, probability 0.3). You flip it once and get heads. Update the probability that the coin is biased using Bayes' theorem.

Solution

  1. 1
    Prior: P(biased)=0.3P(\text{biased})=0.3, P(fair)=0.7P(\text{fair})=0.7
  2. 2
    Likelihoods: P(Hโˆฃbiased)=0.8P(H|\text{biased})=0.8, P(Hโˆฃfair)=0.5P(H|\text{fair})=0.5
  3. 3
    P(H)=0.8(0.3)+0.5(0.7)=0.24+0.35=0.59P(H) = 0.8(0.3) + 0.5(0.7) = 0.24 + 0.35 = 0.59
  4. 4
    P(biasedโˆฃH)=0.8ร—0.30.59=0.240.59โ‰ˆ0.407P(\text{biased}|H) = \frac{0.8 \times 0.3}{0.59} = \frac{0.24}{0.59} \approx 0.407

Answer

P(biasedโˆฃH)โ‰ˆ0.407P(\text{biased}|H) \approx 0.407. One head updates prior from 0.3 to 0.41.
A single head increases the probability the coin is biased (0.3 โ†’ 0.41) because heads is more likely from the biased coin. Each piece of evidence updates the posterior, which becomes the prior for the next observation. This is sequential Bayesian updating.

About Bayes' Theorem

Bayes' theorem gives the posterior probability of a hypothesis given evidence: P(HโˆฃE)=P(EโˆฃH)โ‹…P(H)P(E)P(H|E) = \frac{P(E|H) \cdot P(H)}{P(E)}.

Learn more about Bayes' Theorem โ†’

More Bayes' Theorem Examples