The SURVEYFREQ Procedure

Expected Weighted Frequency

If you specify the EXPECTED option in the TABLES statement, PROC SURVEYFREQ computes expected weighted frequencies for the table cells in two-way 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) is

\[ E_{rc} = \widehat{N}_{r \cdot } ~ \widehat{N}_{\cdot c} ~ / ~ \widehat{N} \]

where $\widehat{N}_{r \cdot }$ is the estimated total for row r, $\widehat{N}_{\cdot c}$ is the estimated total for column c, and $\widehat{N}$ is the estimated overall total. Equivalently, the expected weighted frequency can be expressed as

\[ E_{rc} = \widehat{P}_{r \cdot } ~ \widehat{P}_{\cdot c} ~ \widehat{N} \]

These expected values are used in the design-based chi-square tests of independence, as described in the sections Rao-Scott Chi-Square Test and Wald Chi-Square Test.