Radiation Oncology/Medical Statistics/Chi Squared
Jump to navigation
Jump to search

Χ^{2} (ChiSquared)
Overview[edit]
 Used for comparison of two classifications schemes, which may each have multiple categories
 Purpose is to determine the probability that observed data are (or are not) consistent with the hypothesis H0: the probability of outcomes in the different groups is the same
 Used to approximate Fisher's Exact Test (2x2) for large numbers:
 Accuracy of estimation depends on the total number of observations in each cell
 Expected observations number (calculated from actual observations; see below) should be at least 5 in each cell
 Used to extend Fisher's Exact Test for comparison of classification schemes with >2 categories
Χ^{2} for 2x2 Table[edit]
 Used for tables, which are too large for Fisher's Exact Test
 The process is parallel; please see that page for details of initial setup


 Start by assuming that H0 is true, and that p_{0} = p1 = p2
 Calculate the expected 2x2 table based on the observed total numbers
 Expected population "success rate" is p_{0} = C1 / N
 Using p_{0}, and the observed Group 1/2, Outcome 1/2 numbers, calculate the expected 2x2 table
 Compare the expected table to the observed table, by calculating test statistic T
 One way of calculating T is to evaluate the proportional difference in each cell between the observed and expected values, and then sum them all
 T = ((O_{11}E_{11})^{2}/E_{12}) + ((O_{12}E_{12})^{2}/E_{12}) + ((O_{21}E_{21})^{2}/E_{21}) + ((O_{22}E_{22})^{2}/E_{22})
 After some nifty mathematics, this can more simply be calculated from the original bserved table
 T = N * (O_{11} * O_{22}  O_{12} * O_{21}  1/2*N)^{2} / R1 * R2 * C1 * C2
 Because T is derived from observedexpected difference, the larger the T, the more different the tables are, and the less likely H0
 In order to calculate the significance level, we need to evaluate the probability that the observed table was due to random sampling, which is related to the size of T. We also need to evaluate the probability of all the other possible tables that could have been observed (again, same as in Fisher's test)
 When H0 is true, the probability distribution of T is approximately the same as the probability distribution for the Χ^{2} function
 We can therefore approximately determine the probability of observed T by evaluating the Χ^{2} function at the T level (by looking it up in a table)
 Because these are approximations, the table typically gives critical values:
Probability  0.25  0.10  0.05  0.01  0.005  0.001 
T  1.323  2.706  3.841  6.635  7.879  10.83 
 This is the probability that the observed outcome (and any possible outcomes less likely than this one) occurred due to random sampling only
Χ^{2} for 2x2 Table Example[edit]
 Based on data from PMID 136605, as shown in Using and Understanding Medical Statistics
 Test question is whether size of bone marrow dose correlates with graft rejection rate


 T = 8.01
 From the Χ^{2} table above, p is between 0.005 and 0.001.
 We can therefore conclude that p < 0.005 and that high cell dose correlates strongly with engraftment