Fixed problem with chi-squared sample size estimator. Updated test program accordingly. Added chi-square tutorial code.