Exercise

A single permuted Chi-sq

The key to generating data under a null hypothesis of independence is permutation. Generate just a single dataset to see what sort of chi-squared statistic you might observe when in fact these two variables are independent of one another.

Instructions 1/3

undefined XP
    1
    2
    3

Using gss_party, first specify that you'd like to study natarms as a function of party, create a null hypothesis of independence, then generate a single dataset via permutation. Save this as perm_1.