Biased Coin?

A coin was flipped 1000 times, and 550 times it showed heads. Do you think the coin is biased? Why or why not?

This is the same question as problem #15 in the Statistics chapter of Ace the Data Science Interview!

Because the sample size of flips is large (1000), we can apply the Central Limit Theorem. Since each individual flip is a Bernoulli random variable, we can assume that *p* is the probability of a head. We want to test whether *p* is .5 (i.e., whether it is a fair coin or not). The Central Limit Theorem allows us to approximate the total number of heads seen as being normally distributed.

More specifically, the number of heads seen out of *n* total rolls follows a binomial distribution since it a sum of Bernoulli random variables. If the coin is not biased (*p* = .5), then the expected number of heads is as follows:

$\mu = np = 1000*0.5 = 500$

and the variance of the number of heads is given by:

$\sigma^2 = np(1-p) = 1000*0.5*0.5 = 250, \sigma = \sqrt{250} \approx 16$

Since this mean and standard deviation specify the normal distribution, we can calculate the corresponding z-score for 550 heads as follows:

$z = \frac{550-500}{16} = 3.16$

This means that, if the coin were fair, the event of seeing 550 heads should occur with a < 0.1% chance under normality assumptions. Therefore, the coin is likely biased.