Friday, 25 January 2008

Math works

I had fun today in class with the following formula: 0.98/√N.

This formula is a radical simplification of 1.96×√p√(1-p)/√N, the confidence interval formula for a sample proportion; in other words, it’s how you calculate the 95% margin of error due to sampling error for a survey (use .5 for p and simplify). For the complete gearheads in the audience, I've occasionally seen the 1.96 replaced by the critical value of the t distribution with the appropriate number of degrees of freedom (and it may explain how the poll below got a 4.3% margin of error when I got 4.2%); not sure if I should or not, but at N>200 it really shouldn’t matter much anyway. If N<200, you likely have more serious problems anyway.

I think the students were somewhat bewildered though, although they were amused when I played with subpopulation statistics in this poll to demonstrate that Ron Paul’s lead in Florida among likely black voters in the Republican primary (based on an N of approximately 6, give or take 3) was really very meaningless; feel free to do the math yourself.