Biased Coin Bayesian Inference

Problem 3.4 • After observing heads, how confident are we the coin is biased?

🎲 Scenario: You have two coins in a bag - one is fair (50% heads) and one is biased (75% heads). You pick one at random and start flipping.

❓ Question: After seeing the sequence of flips, what's the probability you picked the biased coin?

🪙 Flip the Coin

Click "Flip" to start...
0
Heads
0
Tails
0
Total

📊 Prior (Before Flipping)

Fair
50%
Biased
50%

📈 Posterior (After Flipping)

Fair
50%
Biased
50%
🤔
50% - Could be either coin!
Start flipping to gather evidence

🎰 Coin Parameters

Fair Coin
50%
P(H) = 0.5
Biased Coin
75%
P(H) = 0.75
Prior Probability

Before any flips, each coin is equally likely: P(Fair) = P(Biased) = 0.5

📐 Bayes Update Formula

P(Biased|Data) =
P(Data|Biased) × P(Biased)
────────────────────
P(Data)

Where:

  • P(Data|Biased) = 0.75h × 0.25t
  • P(Data|Fair) = 0.5h × 0.5t
  • h = heads count, t = tails count

💡 Key Insight

Each flip updates our belief. More heads → more likely biased. Try getting 4 heads in a row (like in problem 3.4) and watch how the posterior probability jumps!