Skip to content →

Large

Home
Up
Small
Large

x2 Test

    The xtest first requires that the data be arranged in a contingency table like the one below.  The column may have as many columns and rows as necessary to accommodate all of the categories.

 TreatmentControlTotal
Positiveabr1
Negativecdr2
Totalc1c2N

Once the observed values are in the table, the expected values for each cell are calculated by taking the product of its row total and its column total then dividing by the grand total (N). 

The hypotheses are

Ho:  there is no association between the factors

HA:  there is an association

and the x2 statistic is calculated by

where E is the expected value for a cell and O is its observed value.

The critical value can be found in the x2 table with (# of rows-1)(# of columns-1) degrees of freedom and the desired alpha value.  If the xstatistic is larger than the critical value, the null hypothesis that there is no association between the factors is rejected.

Skip to toolbar