Browse files

Some more useful debug info for makeChiSquare nu < 1

  • Loading branch information...
1 parent 93cd99d commit aa18620b8d73c10212730bd540502e5d8b0ef4ec @bmillwood committed Jul 29, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 nrichRPG/problems.js
View
4 nrichRPG/problems.js
@@ -2542,7 +2542,9 @@ function makeChiSquare()
var nu=row2.length-1-nparms[which];
aString+="$$\\nu = "+nu+"$$";
if(nu<1)
- throw new Error("makeChiSquare: nu < 1");
+ throw new Error("makeChiSquare: nu < 1!" +
+ "\n\twhich:" + which +
+ "\n\trow2.length:" + row2.length);
var critval=tableChi.values[nu-1][p];
aString+="Critical region: \\(\\chi^2 >"+critval+"\\)<br />";
if(chisq>critval)

0 comments on commit aa18620

Please sign in to comment.