DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


Chi2OfContTab

Declaration: Chi2OfContTab (ContTab: TInt2DArray; var chisq, p: double): integer;

The function Chi2OfContTab calculates the chi-square value for a given contingency table. The parameter ContTab contains the contingency table (including the margin sums), the variable parameters chisq and p return the chi-square value and the corresponding p value, respectively. The function returns 0 if everything is OK, or -1 if the contingency table is too small.