Chi-Square Test and Proportion Testing

Chi-Square Test

  • The chi-square test indicates strength of association but does not define the pattern or nature of the relationship.

Testing for Proportions Example

  • Null Hypothesis (H0): Horned lizards eat equal amounts of leaf cutter, carpenter, and black ants.
  • Alternative Hypothesis (H): Horned lizards prefer one species of ants over others.

Data Summary:

  • Observed counts for ants eaten:

    • Leaf Cutter: 25
    • Carpenter: 18
    • Black Ants: 17
    • Total: 60
  • Expected counts (equal distribution):

    • Leaf Cutter: 20
    • Carpenter: 20
    • Black Ants: 20
    • Total: 60

Calculations:

  • Difference (O-E):

    • Leaf Cutter: 5
    • Carpenter: -2
    • Black Ants: -3
    • Total: 0
  • Squared Differences (O-E)^2:

    • Leaf Cutter: 1.25
    • Carpenter: 0.2
    • Black Ants: 0.45
  • Chi-Squared (X²) value:

    • Formula: X² = \sum \frac{(O - E)²}{E}
    • Result: X² = 1.90

Degrees of Freedom

  • Formula: df = (r - 1)(c - 1)
    • where r = rows, c = columns
  • Compute: df = (1)(2) = 2