Skip to content

Chi Squared Test For Trend

  • Tests whether observed counts in a contingency table differ from counts expected under no relationship between two categorical variables.
  • Involves computing expected frequencies, summing (observed − expected)^2/expected across cells, and comparing the result to a Chi-squared critical value.
  • Commonly applied in fields such as sociology and psychology.

The Chi-squared test for trend is a statistical test used to determine if there is a significant relationship between two variables by comparing observed counts in a contingency table to expected counts under the assumption of no relationship.

Steps to perform the Chi-squared test for trend, as described in the source:

  1. Set up a contingency table showing the number of observations in each category for both variables.
  2. Calculate expected frequencies for each cell using the formula:
E=Row Total×Column TotalTable TotalE = \frac{\text{Row Total} \times \text{Column Total}}{\text{Table Total}}
  1. Compute the Chi-squared statistic by summing, over all cells, the squared differences between observed and expected frequencies divided by the expected frequency:
χ2=(OE)2E\chi^2 = \sum \frac{(O - E)^2}{E}
  1. Determine the degrees of freedom:
df=(number of rows1)×(number of columns1)\text{df} = (\text{number of rows} - 1) \times (\text{number of columns} - 1)
  1. Compare the calculated Chi-squared statistic to the critical value from a Chi-squared table for the chosen significance level and the calculated degrees of freedom.
    • If the statistic is greater than the critical value, conclude there is a significant relationship between the variables.
    • If the statistic is less than the critical value, do not conclude a significant relationship; observed differences may be due to chance.

Example contingency table (relationship between gender and political party affiliation):

GenderRepublicanDemocratTotal
Male201030
Female152540
Total353570

Example calculations from the table:

  • Expected frequency for male Democrats:
E=30×3570=15.5E = \frac{30 \times 35}{70} = 15.5
  • Chi-squared contribution for male Democrats:
(2015.5)215.5=1.29\frac{(20 - 15.5)^2}{15.5} = 1.29

Repeat the same process for each cell and sum the results to obtain the final Chi-squared statistic. Degrees of freedom for this example:

(21)×(21)=1(2 - 1) \times (2 - 1) = 1
  • Applied in sociology and psychology to examine relationships between two categorical variables.
  • The test result is interpreted by comparing the calculated Chi-squared statistic to the critical value from a Chi-squared table at the chosen significance level and appropriate degrees of freedom.
  • A statistic greater than the critical value indicates a significant relationship; a statistic less than the critical value indicates the observed differences may be due to chance.
  • Contingency table
  • Degrees of freedom