# Should I use a binomial cdf or a normal cdf when flipping coins?

A coin needs to be tested for fairness. 30 heads come up after 50 flips. Assuming the coin is fair, what is the probability that you would get at least 30 heads in 50 flips?

The right way to do this problem, according to my teacher, is to do

normalcdf(min = .6, max = ∞, p = .5, σ = sqrt(.5 * .5 / 50) = 0.0786


However, I took a binomial cumulative distribution function like this

1 - binomcdf(n = 50, p = .5, x = 29) = 0.1013


I believe the criteria for a binomial distribution are satisfied: the individual events are independent, there are only two possible outcomes (heads vs. tails), the probability is constant for the question (0.5), and the number of trials is fixed at 50. Yet obviously, the two methods give different answers, and a simulation supports my answer (at least the few times I ran it; obviously, I can't guarantee that you'd get the same results).

Is my teacher wrong in assuming that a Normal distribution curve would also be a valid way to do this problem (at no point is it said that the distribution is Normal, but n*p and n*(1-p) are both greater than 10), or have I misunderstood something about binomial distributions?

• A person with experience in using Normal approximations to the Binomial would proceed a little differently: they would apply the (usual) continuity correction, as in 1 - pnorm((30-0.5)/50, mean=0.5, sd=sqrt(0.5*(1-0.5)/50)) (this is an R expression), whose value is 0.1015, in quite close agreement with the Binomial cdf. – whuber Jan 18 '12 at 21:23

Here is an illustration of the answers of whuber and onestop. In red the binomial distribution $\mathcal Bin(50,0.5)$, in black the density of the normal approximation $\mathcal N(25, 12.5)$, and in blue the surface corresponding to $\mathbb P(Y > 29.5)$ for $Y \sim \mathcal N(25, 12.5)$.

The height of a red bar corresponding to $\mathbb P(X=k)$ for $X\sim\mathcal Bin(50,0.5)$ is well approximated by $\mathbb P\left( k -{1\over 2} < Y < k + {1\over 2}\right)$. To get a good approximation of $\mathbb P(X \ge 30)$, you need to use $\mathbb P(Y>29.5)$.

(edit) This is $$\mathbb P(Y>29.5) \simeq 0.1015459,$$ (obtained in R by 1-pnorm(29.5,25,sqrt(12.5))) whereas $$\mathbb P(X \ge 30) \simeq 0.1013194:$$ the approximation is correct.

This is called continuity correction. It allows you to compute even "point probabilities" like $\mathbb P(X=22)$ : \begin{align*} \mathbb P(X=22) &= {50 \choose 22} 0.5^{22} \cdot 0.5^{28} \simeq 0.07882567, \\ \mathbb P(21.5 < Y < 22.5) & \simeq 0.2397501 - 0.1610994 \simeq 0.07865066.\end{align*}

The normal distribution gives a closer approximation to the binomial if you use a continuity correction. Using this for your example, I get 0.1015. As this is homework, I'll leave it to you to fill in the details.

Consider this. In the discrete binomial distribution you have actual probabilities for individual numbers. In the continuous normal that isn't the case, you need a range of values. So... if you were going to approximate the probability of an individual value, let's say X, from the binomial with the normal how would you do that? Look at a probability histogram of the binomial distribution with the normal curve laid over it. You would need to actually select from X ± 0.5 to capture something similar to what the binomial probability of X is with the normal approximation.

Now extend that to when you're selecting a tail of the distribution. When you use the binomial method you're selecting your entire value's probability (30 in your case) plus everything higher. Therefore, when you do the continuous you have to make sure you capture that and select 0.5 less as well, so the cutoff on the continuous distribution is 29.5.

• Actually, the question exhibits a thoughtful understanding of the problem and does not appear to be looking for an answer to a routine homework question. Although it's tagged homework, consider making an exception here. In particular, a good discussion of using the Normal distribution to approximate discrete distributions (such as Binomials and Poissons with large N's) would be appropriate and most welcome here. – whuber Jan 18 '12 at 23:37