# elementary statistics: compare binomial to normal distributions

Thank you for your help. I want to compare binomial and normal distributions to prove to myself (numerically) how binomial distributions approach normal distributions as n increases. I know books say this, but I've never read how to prove it to myself (in R, sas, or by pencil). My guess is to create an x-vector of length "n" and generate a binomial-y-vector and a normal-y-vector and then compare the distance between the y-vectors generated. I'm sure that as "n" increases, the y-vector distances will decrease, but how do I measure this? My first thought was a basic sum of squares calculation (I, II, III?). I also noticed that the comparison will be affected by the length of the vector and not just the distance between y-vectors (longer vectors will naturally reduce the distance). Am I on the right track? How can I do this? again, thank you for the help!

• I think that rather than doing a basic sum of squares, you'd want to use a Kolmogorov-Smirnov test, or one of the other tests that exists to compare distributions. You can generate a large vector of binomial random variables, then use Kolmogorov-Smirnov to test for normality. Commented Jan 11, 2020 at 3:04
• Are you trying to show that the distributions get closer together as n increases? (rather than samples from those distributions...) Commented Jan 11, 2020 at 5:41
• Thanks! Since the binomial distribution approaches the normal at around n=20 (or so the books say), I want to be able to quantify this "approach" numerically. maybe start with a n=5 comparison and increase to n=100 or more. At the same time, measure in some way how the curves get closer to each other. One potential complication is that as the vectors get longer, their very length probably will contribute to them "getting closer" so instead, I'd probably keep the comparison fair by testing the "middle 10" values of the distributions, whether n=10 or n=100, just the middle 10. Commented Jan 11, 2020 at 6:07
• The "curves" in question would be based on cumulative probability distributions. Graphs of probability functions do not get closer to graphs of probability density functions. (One might also carry out such an analysis using characteristic functions or continuous transformations thereof, such as cumulant generating functions, but those would be more difficult to interpret.) However, in this particular case histograms (which use areas rather than heights to represent probabilities) will converge: see stats.stackexchange.com/a/3904/919 for an illustration.
– whuber
Commented Jan 11, 2020 at 13:49

Assuming you want to visualize how the binomial approaches the normal as n grows I'd do it as follows:

1. Choose some value for the second parameter, $$p$$ (like say 0.5 or 0.2)

2. draw a standard normal cdf and compute and plot the cdf of a standardized binomial at some $$n=n_1$$

3. draw a standard normal cdf and compute and plot the cdf of a standardized binomial at some $$n=n_2>>n_1$$

4. draw a standard normal cdf and compute and plot the cdf of a standardized binomial at some $$n=n_3>>n_2$$

You can try various values for p and for the different n's.

Something like this:

(though ideally you'd mention the value of p somewhere as well; I'll leave prettying things up like that to you though)

par(mfrow=c(1,3))
p=0.5
curve(pnorm,-3,3,main="binomial cdf vs normal cdf, n=10")
n=10;x=0:n
plot(stepfun((x-n*p)/sqrt(n*p*(1-p)),c(0,pbinom(x,n,p))),