I am taking a break from my usual psychology antics to share some statistics-related code with the world. I wrote this Python program using standard libraries (no stats libraries) to verify that using (n-1) instead of (n) to calculate sample variance is a better long-run estimator of population variance. I’m quite sure both the code and the math is sloppy: let me know so I can refine it!
http://dl.dropbox.com/u/17834939/SampleVariance.py
(Originally, I tried pasting the code in, but I got ugly extra line breaks, so I’ve linked to the text file above).