The 1,000-Coin Bayes Puzzle

You pick 1 coin uniformly at random from a bag with 1 double-headed coin and 999 fair coins. After flipping the chosen coin and seeing only heads, what is the probability it is the double-headed coin?
Interactive evidence
Consecutive heads observed: 10
Prior
P(D) = 1/1000
Likelihood
P(H^10 | F) = 1/1024
Posterior
1024 / 2023
Answer
50.62%
Bayes' Rule
P(D | Hn) =

[ P(Hn | D) · P(D) ] / [ P(Hn | D) · P(D) + P(Hn | F) · P(F) ]
For n = 10:

P(D | H10) = [ 1 · (1/1000) ] / [ 1 · (1/1000) + (1/1024) · (999/1000) ]

= 1024 / 2023 ≈ 50.62%
Probability coin is double-headed 50.62%
Probability coin is fair 49.38%
Intuition:
The double-headed coin starts with a tiny prior chance: only 1/1000. But seeing 10 heads in a row is 1024 times more likely under a double-headed coin than under a fair coin. That evidence almost exactly cancels the huge prior disadvantage.