Answer:
df = (r - 1) * (c - 1)
Explanation:
Chi square is calculated when simple random sampling is known and variable are categorical.
Four steps are included in chi-square:
(1) state the hypotheses
(2) formulate an analysis plan
(3) analyze sample data
(4) interpret results.
State the hypothesis is
null hypothesis: Variable a and variable b are independent.
H 1: Variable a and variable bare not independent.
Formulate analysis plan:
This plan describe the significance level and test statistic.
Analyze the sample data
We analyze the degree of freedom and expected frequencies.
The degree of freedom formula is
df = (r - 1) * (c - 1)
r = number of levels for one categorical variable
c = number of levels for the other categorical variable