Ch. 9Study Notes on Chi-square Tests and Categorical Variables

Overview of Categorical Variables

  • Categorical variables: limited values (e.g., gender, favorite color)

  • Participants assigned to one category, count frequency of values.

Contingency Tables

  • Summarize associations between two categorical variables.

  • Show cell frequencies and row/column totals.

Chi-square (c2) Test

  • Assess observed vs. expected frequencies.

  • If null hypothesis (H0) is true, expected frequencies calculated as:
    (Row total×Column total)/Total participants(Row\ total \times Column\ total) / Total\ participants

  • Comparison formula:
    (obs freqexp freq)2/exp freq(obs\ freq - exp\ freq)^2 / exp\ freq summed across cells.

Hypotheses for Chi-square Independence Test

  • H0: No association between variables.

  • H1: There is an association.

  • Decision based on p-value relative to significance level (α).

SPSS Chi-square Test Process

  1. Data entry for each cell as rows.

  2. Weight cases using frequency column.

  3. Analyze -> Descriptive Statistics -> Crosstabs.

  4. Select required statistics (Chi-square, Frequencies).

Assumptions of the Test

  • Categories must be mutually exclusive.

  • At least one observation per cell.

  • Expected frequencies > 5 in > 20% of cells.
    (Use Fisher’s Exact test if violated)

Goodness-of-Fit Test

  • One categorical variable to check if observed frequencies are as expected.

  • Null hypothesis expects even distribution.

  • Calculate c2 similarly as above.

Goodness-of-Fit Test in SPSS

  • Analyze -> Nonparametric Tests -> Chi-square.

  • Enter expected counts manually or select equal.

Interpretation of Results

  • Significant p-value (< 0.05) leads to rejection of H0.

  • Indicates significant association or preference among variables.

Summary of c2 Applications

  • Used for observing distribution across values or association between two categorical variables.

  • Can be extended to larger tables, logistic regression may be applicable.