Source: http://cda.psych.uiuc.edu/matlab_pdf/stats.pdf