|

Super-Duper Easy Calculator for Confidence Interval of Difference in Proportions

Today, I wanted to find the confidence interval for the difference between two proportions. I have SAS, SPSS, Stata, JMP,  Excel and God knows what else laying around. I did not want to go to the effort of plugging the numbers into a calculator, but it really is a pretty straightforward formula, so you would THINK that you could easily find something in SAS or SPSS for example to give you the confidence interval.

Seems like a reasonable thing to want, particularly given all of the interest in election season as to whether the 49% found in Poll A is significantly different than the 51% found in Poll B.

It’s easy enough (for me) to do a chi-square in SAS or SPSS.  SAS will give you a binomial test and confidence intervals for a proportion, which is actually reasonable if you have a large sample size. In my case, I had over 12,000 so I could have used the proportion in that as the population proportion.

I did not want to do that, though. I wanted the actual test of  the difference in proportions from two independent samples and I thought surely there must be an easy way to do this in SAS or SPSS. I found ways, but none of them were easier than plugging numbers for the formula into a calculator.

Lo and behold, I found the neatest little calculator for differences in proportions over at the Vassar Stats site. You don’t need to do any programming at all (which will make my students ecstatic) and you only need four numbers. Just plug in the proportion in each sample and the N, then hit calculate.

It was so cute, that I went and checked out the rest of the Vassar Stats site and it is a great  resource for teaching students statistics.  The applets there let students plug in data and see the results immediately without doing any programming. While I *want* students to do programming in my courses, for a variety of reasons, all of them good, I also know that the more you get your hands into the data, the more you understand statistics. I am definitely adding this Vassar Stats site into my teaching arsenal and props to Richard Lowry for doing it.

Similar Posts

One Comment

  1. Fun fact I spotted: the Vassar web page (http://vassarstats.net/prop2_ind.html) makes reference to a paper by R Newcombe (http://psych.stanford.edu/~jlm/pdfs/Newcombe98Proportions.pdf) that
    acknowledges “for assistance
    with programming” C M Berners-Lee (http://en.wikipedia.org/wiki/Conway_Berners-Lee), the father of Sir Tim.

    So by adding the site to your teaching arsenal you are building on the work of the father for content and son for platform.

Leave a Reply

Your email address will not be published. Required fields are marked *