180 likes | 270 Views
Review of Chi Square. Richard L. Amdur, PhD Chief, Biostatistics, DCVAMC. Slides are saved in T:Biostat. region x response. region response Frequency| Percent |
E N D
Review of Chi Square Richard L. Amdur, PhD Chief, Biostatistics, DCVAMC Slides are saved in T:\Biostat
region x response region response Frequency| Percent | Row Pct | Col Pct |No |Yes | Total ---------+--------+--------+ A | 60 | 140 | 200 | 10.00 | 23.33 | 33.33 | 30.00 | 70.00 | | 27.91 | 36.36 | ---------+--------+--------+ B | 70 | 130 | 200 | 11.67 | 21.67 | 33.33 | 35.00 | 65.00 | | 32.56 | 33.77 | ---------+--------+--------+ C | 85 | 115 | 200 | 14.17 | 19.17 | 33.33 | 42.50 | 57.50 | | 39.53 | 29.87 | ---------+--------+--------+ Total 215385 600 35.83 64.17 100.00 Statistic DF Value Prob ------------------------------------------------------ Chi-Square 2 6.8861 0.0320 Phi Coefficient 0.1071
region x response region response Frequency| Percent | Row Pct | Col Pct |No |Yes | Total ---------+--------+--------+ A | 60 | 140 | 200 | 10.00 | 23.33 | 33.33 | 30.00 | 70.00 | | 27.91 | 36.36 | ---------+--------+--------+ B | 70 | 130 | 200 | 11.67 | 21.67 | 33.33 | 35.00 | 65.00 | | 32.56 | 33.77 | ---------+--------+--------+ C | 85 | 115 | 200 | 14.17 | 19.17 | 33.33 | 42.50 | 57.50 | | 39.53 | 29.87 | ---------+--------+--------+ Total 215 385 600 35.83 64.17 100.00 Statistic DF Value Prob ------------------------------------------------------ Chi-Square 2 6.8861 0.0320 Phi Coefficient 0.1071
region x response region response Frequency| Percent | Row Pct | Col Pct |No |Yes | Total ---------+--------+--------+ A | 60 | 140 | 200 | 10.00 | 23.33 | 33.33 | 30.00 | 70.00 | | 27.91 | 36.36 | ---------+--------+--------+ B | 70 | 130 | 200 | 11.67 | 21.67 | 33.33 | 35.00 | 65.00 | | 32.56 | 33.77 | ---------+--------+--------+ C | 85 | 115 | 200 | 14.17 | 19.17 | 33.33 | 42.50 | 57.50 | | 39.53 | 29.87 | ---------+--------+--------+ Total 215 385 600 35.83 64.17 100.00 Statistic DF Value Prob ------------------------------------------------------ Chi-Square 2 6.8861 0.0320 Phi Coefficient 0.1071
region x response region response Frequency| Percent | Row Pct | Col Pct |No |Yes | Total ---------+--------+--------+ A | 60 | 140 | 200 | 10.00 | 23.33 | 33.33 | 30.00 | 70.00 | | 27.91 | 36.36 | ---------+--------+--------+ B | 70 | 130 | 200 | 11.67 | 21.67 | 33.33 | 35.00 | 65.00 | | 32.56 | 33.77 | ---------+--------+--------+ C | 85 | 115 | 200 | 14.17 | 19.17 | 33.33 | 42.50 | 57.50 | | 39.53 | 29.87 | ---------+--------+--------+ Total 215 385 600 35.83 64.17 100.00 Statistic DF Value Prob ------------------------------------------------------ Chi-Square 2 6.8861 0.0320 Phi Coefficient 0.1071
region x response region response Frequency| Percent | Row Pct | Col Pct |No |Yes | Total ---------+--------+--------+ A | 60 | 140 | 200 | 10.00 | 23.33 | 33.33 | 30.00 | 70.00 | | 27.91 | 36.36 | ---------+--------+--------+ B | 70 | 130 | 200 | 11.67 | 21.67 | 33.33 | 35.00 | 65.00 | | 32.56 | 33.77 | ---------+--------+--------+ C | 85 | 115 | 200 | 14.17 | 19.17 | 33.33 | 42.50 | 57.50 | | 39.53 | 29.87 | ---------+--------+--------+ Total 215 385 600 35.83 64.17 100.00 Statistic DF Value Prob ------------------------------------------------------ Chi-Square 2 6.8861 0.0320 Phi Coefficient 0.1071
Region (A vs. B) x response region response Frequency| Percent | Row Pct | Col Pct |No |Yes | Total ---------+--------+--------+ A | 60 | 140 | 200 | 15.00 | 35.00 | 50.00 | 30.00 | 70.00 | | 46.15 | 51.85 | ---------+--------+--------+ B | 70 | 130 | 200 | 17.50 | 32.50 | 50.00 | 35.00 | 65.00 | | 53.85 | 48.15 | ---------+--------+--------+ Total 130 270 400 32.50 67.50 100.00 Statistic DF Value Prob ------------------------------------------------------ Chi-Square 1 1.1396 0.2857 Phi Coefficient -0.0534
Region (B vs. C) x response region response Frequency| Percent | Row Pct | Col Pct |No |Yes | Total ---------+--------+--------+ B | 70 | 130 | 200 | 17.50 | 32.50 | 50.00 | 35.00 | 65.00 | | 45.16 | 53.06 | ---------+--------+--------+ C | 85 | 115 | 200 | 21.25 | 28.75 | 50.00 | 42.50 | 57.50 | | 54.84 | 46.94 | ---------+--------+--------+ Total 155 245 400 38.75 61.25 100.00 Statistic DF Value Prob ------------------------------------------------------ Chi-Square 1 2.3700 0.1237 Phi Coefficient -0.0770
Region (A vs. C) x response region response Frequency| Percent | Row Pct | Col Pct |No |Yes | Total ---------+--------+--------+ A | 60 | 140 | 200 | 15.00 | 35.00 | 50.00 | 30.00 | 70.00 | | 41.38 | 54.90 | ---------+--------+--------+ C | 85 | 115 | 200 | 21.25 | 28.75 | 50.00 | 42.50 | 57.50 | | 58.62 | 45.10 | ---------+--------+--------+ Total 145 255 400 36.25 63.75 100.00 Statistic DF Value Prob ------------------------------------------------------ Chi-Square 1 6.7613 0.0093 Phi Coefficient -0.1300
Region (A vs. B+C) x response region response Frequency| Percent | Row Pct | Col Pct |No |Yes | Total ---------+--------+--------+ A | 60 | 140 | 200 | 10.00 | 23.33 | 33.33 | 30.00 | 70.00 | | 27.91 | 36.36 | ---------+--------+--------+ B+C | 155 | 245 | 400 | 25.83 | 40.83 | 66.67 | 38.75 | 61.25 | | 72.09 | 63.64 | ---------+--------+--------+ Total 215 385 600 35.83 64.17 100.00 Statistic DF Value Prob ------------------------------------------------------ Chi-Square 1 4.4397 0.0351 Phi Coefficient -0.0860
Region (A+B vs. C) x response region response Frequency| Percent | Row Pct | Col Pct |No |Yes | Total ---------+--------+--------+ A+B | 130 | 270 | 400 | 21.67 | 45.00 | 66.67 | 32.50 | 67.50 | | 60.47 | 70.13 | ---------+--------+--------+ C | 85 | 115 | 200 | 14.17 | 19.17 | 33.33 | 42.50 | 57.50 | | 39.53 | 29.87 | ---------+--------+--------+ Total 215 385 600 35.83 64.17 100.00 Statistic DF Value Prob ------------------------------------------------------ Chi-Square 1 5.7989 0.0160 Phi Coefficient -0.0983
Odds Ratio for a Yes Response in Region C Number of subjects responding Yes or No in each region response • region | No | Yes| Total ----------+------+--------+-------- A+B | 130 | 270 | 400 ----------+------+--------+-------- C | 85 | 115 | 200 ----------+------+--------+-------- Total 215 385 600 OR (C=yes) = (115/85)/(270/130) = 0.65 95% Confidence interval is 0.46 – 0.92 The odds of saying “yes” are 35% lower in C than in the other regions. The Relative Risk of saying “yes” in Region C is 0.85, compared to Regions A&B [RR = (115/200)/(270/400)
For % yes, rows that do not share a superscipt are significantly different (p<.05).
How to compute a 2x2 chi-square http://graphpad.com/quickcalcs/contingency1.cfm
When there are more than 2 rows or columns: http://www.physics.csbsju.edu/stats/contingency_NROW_NCOLUMN_form.html r×c Contingency Table: How many rows? columns? You are about to enter your data for a chi-square contingency table analysis. For this to make sense you should have a table of data (at least 2x2; maximum: 9x9). Number of rows: Number of columns: You must have data for each box in the table: no blanks allowed!
Data Entry: 3 × 2 Contingency Table Your data have been doubly sorted into one of the 2 "treatments" (A, B, ...) and into one of the 3 "outcomes" (1, 2, ...). In the below table you are to enter the number of data items that fit into a particular (treatment,outcome) pair e.g., (B1 or A2). Enter your data in the below set of boxes and then click on the Calculate Now button when data entry is complete. Leave no empty boxes! All entries should be whole numbers! A B 1 2 3
r × c Contingency Table: Results The results of a contingency table X2 statistical test performed at 12:53 on 19-DEC-2010 data: contingency table A B • 60 140 200 • 70 130 200 • 85 115 200 • 215 385 600 • expected: contingency table • A B • 71.7 128. • 71.7 128. • 71.7 128. chi-square = 6.89 degrees of freedom = 2probability = 0.032