A statistical test that allows one to determine whether observed quantities of a specific characteristic differed from the expected value purely by chance.
output out=chisqdat pchi lrchi n nmiss; title 'Chi-Square Tests for 3 by 5 Table of Eye and Hair Color'; run; proc print data=chisqdat noobs; title 'Chi-Square Statistics for Eye and Hair Color'; ...
The chi-square value is calculated using the following formula: Using this formula, the difference between the observed and expected frequencies is calculated for each experimental outcome category.