Chi Square Test Notes

Chi Square Test Overview

  • Chi Square Test Purpose

  • Used for making comparisons when dealing with categorical outcomes (nominal data).

  • Different from tests for continuous dependent variables (T-tests, ANOVAs).

  • Understanding Dependent Variables

  • Dependent variables can be measured on:

    • Ordinal scale
    • Ratio scale
    • Interval scale
    • Nominal scale: Identifies characteristics without measurement (e.g., eye color, gender).

Application of Chi Square in Research

  • Example with Koalas

  • Researching gender (male, female) preference for tree types (gray gum, forest red gum).

  • Dependent variable: Gender (categorical); Independent variable: Tree type (categorical).

  • Hypothetical study recorded koalas in 100 randomly selected trees.

  • Data Presentation

  • Results shown in a contingency table (cross-tables showing male/female in both tree types).

  • Example: 56 gray gums, 44 forest red gums.

Understanding Chi Square Tests

  • Types of Chi Square Tests
  • Chi Square Goodness of Fit Test:
    • Single characteristic with two levels.
    • Tests if the observed proportions fit an expected distribution (e.g., males vs. females).
  • Chi Square Test of Independence:
    • Two categorical variables (e.g., koala gender and tree type).
    • Tests the null hypothesis that the variables are independent.
  • Chi Square Test of Homogeneity:
    • Compares distributions of categorical variables across different populations.

Conducting and Interpreting Chi Square Tests

  • Hypothesis Testing Basics

  • Null hypothesis: Assumes no association or preference between variables.

  • Alternative hypothesis: Assumes there is a preference or association.

  • Use test statistics derived from the observed vs. expected frequencies.

  • If chi square statistic is large and p-value < 0.05, reject the null hypothesis.

  • Important Factors

  • Assumptions of Chi Square tests include:

    • Expected values in each category must be > 1.
    • At least 80% of categories must have expected values > 5.
  • If assumptions are violated, consider Fisher's Exact Test (non-parametric alternative).

Examples and Output Interpretation

  • Real Data Example

  • For F1 hybrid of smooth and wrinkled peas:

    • Hypothesis: Proportions of smooth to wrinkled peas follow a 3:1 ratio.
    • Results: Observed frequencies (69 smooth, 31 wrinkled).
    • Conduct chi square test, output gives test statistic and p-value.
    • If p-value < 0.05, reject the null that the ratios are equal.
  • Cohort Study Example

  • Investigating smoking rates in men vs. women.

  • Null hypothesis: Smoking is independent of gender.

  • Chi square test leading to assessment of whether smoking rates differ by gender.

  • If p-value < 0.01, reject null suggesting gender does affect smoking rates.

Summary and Conclusion

  • Chi square tests cover varying types of categorical data analysis.
  • Essential for understanding relationships between variables in nominal measurements.
  • Develops skills for interpreting data across various types of categorical assessments.