Computes whether there is a 95% probability that this correlation happened by chance
Computes whether there is a 95% probability that this correlation happened by chance
TODO generalize this so that it looks up the P value based on user-specified confidence
val dof = (table.height - 1) * (table.width - 1)
http://fonsg3.
http://fonsg3.let.uva.nl/Service/Statistics/ChiSquare_distribution.html
Z = {(X2/DoF)(1/3) - (1 - 2/(9*DoF))}/SQRT(2/(9*DoF))
http://www.math.bcit.ca/faculty/david_sabo/apples/math2441/section8/onevariance/chisqtable/chisqtable.htm
TODO validate this against http://www.ento.vt.edu/~sharov/PopEcol/tables/chisq.html