The question

Suppose a coin lands heads 60% of the time instead of 50%.

Would you notice after 10 flips? What about 100?

I wanted to see how many flips it would take before a slightly biased coin started looking suspicious.

We’ll compare a fair coin with a biased one and see how the evidence changes as we collect more flips.

What a fair coin predicts

For a fair coin, each flip has a 50% chance of heads.

The number of heads in a fixed number of flips follows a binomial distribution:

\[X \sim \mathrm{Binomial}(n,p)\]

\[P(X=k)=\binom{n}{k}p^k(1-p)^{n-k}\]

Here, \(n\) is the number of flips, \(p\) is the chance of heads, and \(k\) is the number of heads observed.

Testing the coin

We can use a two-sided hypothesis test:

\[H_0: p=0.50\]

\[H_A: p\neq 0.50\]

I’ll use a significance level of \(\alpha=0.05\).

A small p-value means the result would be unusual if the coin were actually fair.

It doesn’t prove the coin is rigged, but it gives us a way to measure how suspicious the results are.

Fair vs. biased: 100 flips

The curves overlap quite a bit. Getting 55 heads doesn’t automatically mean something is wrong with the coin.

One example: 60 heads out of 100

Suppose we flip the coin 100 times and get 60 heads.

The exact binomial test gives a p-value of 0.0569.

Since this is above 0.05, we would not reject the fair-coin hypothesis.

I actually expected 60 heads to be enough, but statistically it isn’t quite convincing.

More flips make a difference

Each point is based on 1,000 simulated experiments with a coin that has a 60% chance of landing heads.

Exploring the results

Hover over each point to see how often the simulation detected the biased coin.

The R behind the simulation

n <- 100

heads <- rbinom(1, size = n, prob = 0.6)

p_value <- binom.test(
  heads, n, p = 0.5
)$p.value

p_value < 0.05

This code simulates 100 flips using a biased coin, runs a binomial test, and checks whether the result is statistically significant.

I used the same idea for the larger simulation, repeating the test 1,000 times for each sample size.

What I learned

I expected 60 heads out of 100 flips to be pretty convincing, but the test says otherwise. What stood out was how much the sample size mattered. With only a few flips, a biased coin can look completely normal. Getting more flips doesn’t guarantee the right conclusion every time, but it gives us a much better chance of noticing a small difference.