Suppose you flip a coin n times and get n heads in a row. What is the probability the next flip will land heads?
Suppose the coin is either a fair coin with one heads or a trick coin with two heads. Let X denote our training data of n heads. We want to find P(fair|X) and P(trick|X). Let P(trick)=ϵ. It follows that P(fair)=1−ϵ.
I have flipped perhaps a hundred coins. One was double-headed trick coin. On the one hand, I flip trick coins with anomalously high frequency. On the other hand, double-headed trick coins are more likely than regular coins to get flipped than fair coins. I estimate the flip frequency of double-headed trick coins to be one in ten thousand.
ϵ=trick coinstotal coins=110,000=10−4
What does it look like when we graph our probabilities with ϵ=10−4?
For the first 5 heads you can remain confident you are flipping a regular coin. Around 10 heads the exponential takes off. You quickly become confident you are not flipping a regular coin. At 20 heads in a row you can be confident you are not flipping a regular coin.
The Inflection Point
The inflection point occurs when the probabilities are equal.
How to compute the probability you are flipping a trick coin
Suppose you flip a coin n times and get n heads in a row. What is the probability the next flip will land heads?
Suppose the coin is either a fair coin with one heads or a trick coin with two heads. Let X denote our training data of n heads. We want to find P(fair|X) and P(trick|X). Let P(trick)=ϵ. It follows that P(fair)=1−ϵ.
We use Bayes theorem P(A|B)=P(B|A)P(A)P(B).
P(fair|X)=P(X|fair)P(fair)P(X)=P(X|fair)P(fair)P(fair)P(X|fair)+P(trick)P(X|trick)=2−n(1−ϵ)(1−ϵ)2−n+ϵ1=(1−ϵ)(1−ϵ)+2nϵ
P(trick|X)=P(X|trick)P(trick)P(X)=P(X|trick)P(trick)P(trick)P(X|trick)+P(fair)P(X|fair)=1ϵϵ1+(1−ϵ)2−n=ϵϵ+(1−ϵ)2−n=2nϵ(1−ϵ)+2nϵ
I have flipped perhaps a hundred coins. One was double-headed trick coin. On the one hand, I flip trick coins with anomalously high frequency. On the other hand, double-headed trick coins are more likely than regular coins to get flipped than fair coins. I estimate the flip frequency of double-headed trick coins to be one in ten thousand.
ϵ=trick coinstotal coins=110,000=10−4
What does it look like when we graph our probabilities with ϵ=10−4?
For the first 5 heads you can remain confident you are flipping a regular coin. Around 10 heads the exponential takes off. You quickly become confident you are not flipping a regular coin. At 20 heads in a row you can be confident you are not flipping a regular coin.
The Inflection Point
The inflection point occurs when the probabilities are equal.
P(fair|X)=P(trick|X)(1−ϵ)(1−ϵ)+2nϵ=2nϵ(1−ϵ)+2nϵ1−ϵ=2nϵ1ϵ−1=2n1ϵ=2n+1ϵ=12n+1
A linear increase in your data has predictive power equal to an exponential increase in the strength of your prior.