/*BPS problems 20.6 and 20.8*/ options ls = 80; data NCSU; input Grade ECHs Count @@; datalines; 1 1 11 1 2 68 1 3 3 2 1 9 2 2 23 2 3 5 ; proc freq data=NCSU; weight Count; tables Grade*ECHs/expected chisq; run; quit;