If you specify the EXPECTED option in the TABLES statement, PROC SURVEYFREQ computes expected weighted frequencies for the table cells in twoway tables. The expected weighted frequencies are computed under the null hypothesis that the row and column variables are independent. The expected weighted frequency for table cell (r, c) equals

where is the estimated total for row r, is the estimated total for column c, and is the estimated overall total. Equivalently, the expected weighted frequency can be expressed as

These expected values are used in the designbased chisquare tests of independence, as described in the sections RaoScott ChiSquare Test and Wald ChiSquare Test.