Download presentation
Presentation is loading. Please wait.
Published byEthan Robertson Modified over 9 years ago
1
The analysis of cross-tabulations
2
Today Chi-square test Fisher’s exact test Odds and odds ratios McNemars test
3
Where are we?
4
Cross-tabulations Tables of countable entities Made to analyze the association, relationship, or connection between two variables This association is difficult to describe statistically Null- Hypothesis: “There is no association between the two variables” can be tested Analysis of cross-tabulations with larges samples
5
Delivery and housing tenure Housing tenurePretermTermTotal Owner-occupier50849899 Council tentant29229258 Private tentant11164175 Lives with parents66672 Other33639 Total9913441443
6
Delivery and housing tenure Expected number without any association between delivery and housing tenure Housing tenurePreTermTotal Owner-occupier899 Council tenant258 Private tenant175 Lives with parents72 Other39 Total9913441443
7
Delivery and housing tenure If the null-hypothesis is true 899/1443 = 62.3% are house owners. 62.3% of the Pre-terms should be house owners: 99*899/1443 = 61.7 Housing tenurePreTermTotal Owner-occupier899 Council tenant258 Private tenant175 Lives with parents72 Other39 Total9913441443
8
Delivery and housing tenure If the null-hypothesis is true 899/1443 = 62.3% are house owners. 62.3% of the ‘Term’s should be house owners: 1344*899/1443 = 837.3 Housing tenurePreTermTotal Owner-occupier61.7899 Council tenant258 Private tenant175 Lives with parents72 Other39 Total9913441443
9
Delivery and housing tenure If the null-hypothesis is true 258/1443 = 17.9% are council tenant. 17.9% of the ‘preterm’s should be council tenant: 99*258/1443 = 17.7 Housing tenurePreTermTotal Owner-occupier61.7837.3899 Council tenant258 Private tenant175 Lives with parents72 Other39 Total9913441443
10
Delivery and housing tenure If the null-hypothesis is true In general Housing tenurePreTermTotal Owner-occupier61.7837.3899 Council tenant17.7240.3258 Private tenant12.0163.0175 Lives with parents4.967.172 Other2.736.339 Total9913441443 row total * column total grand total
11
Delivery and housing tenure If the null-hypothesis is true In general Housing tenurePreTermTotal Owner-occupier50(61.7)849(837.3)899 Council tenant29(17.7)229(240.3)258 Private tenant11(12.0)164(163.0)175 Lives with parents6(4.9)66(67.1)72 Other3(2.7)36(36.3)39 Total9913441443 row total * column total grand total
12
Delivery and housing tenure If the null-hypothesis is true Housing tenurePreTermTotal Owner-occupier50(61.7)849(837.3)899 Council tenant29(17.7)229(240.3)258 Private tenant11(12.0)164(163.0)175 Lives with parents6(4.9)66(67.1)72 Other3(2.7)36(36.3)39 Total9913441443
13
Delivery and housing tenure test for association If the numbers are large this will be chi- square distributed. The degree of freedom is (r-1)(c-1) = 4 From Table 13.3 there is a 1 - 5% probability that delivery and housing tenure is not associated
14
Chi Squared Table
15
Delivery and housing tenure If the null-hypothesis is true It is difficult to say anything about the nature of the association. Housing tenurePreTermTotal Owner-occupier50(61.7)849(837.3)899 Council tenant29(17.7)229(240.3)258 Private tenant11(12.0)164(163.0)175 Lives with parents6(4.9)66(67.1)72 Other3(2.7)36(36.3)39 Total9913441443
17
SPSS
18
2 by 2 tables BronchitisNo bronchitisTotal Cough264470 No Cough24710021249 Total27310461319
19
2 by 2 tables BronchitisNo bronchitisTotal Cough26 (14.49)44 (55.51)70 No Cough247 (258.51)1002 (990.49)1249 Total27310461319
20
Chi Squared Table
21
Break and Exercise http://www.smi.hst.aau.dk/~cdahl/statM7/opgaver1.pdf A group of researchers wanted to predict the death from ventilator associated pneumonia in patients admitted to an intensive care unit. The authors measures the blood concentration of proANP on day 0 (D0) and day 4 (D4) after diagnosed ventilator associated pneumonia. They also recorded the age and gender of the patients. They used this data to predict non-survivors. In the study-group 71 patients were enrolled of which 26 died. The percent of males and females distributed between survivors and non-survivors are shown below. 1.Use the 2 -test to test for association between gender and survival. Is there a significant association? 2.Is the 2 -test valid in this case? Gender (%)survivors (n = 45) non-survivors (n = 26) Total (n = 71) Male66.746.259.2 Female33.353.840.8 Total100
22
Chi-square to compare populations
23
Chi-squared test for small samples Expected valued – > 80% >5 –All >1 StreptomycinControlTotal Improvement13 (8.4)5 (9.6)18 Deterioration2 (4.2)7 (4.8)9 Death0 (2.3)5 (2.7)5 Total151732
24
Chi-squared test for small samples Expected valued – > 80% >5 –All >1 StreptomycinControlTotal Improvement13 (8.4)5 (9.6)18 Deterioration and death 2 (6.6)12 (7.4)14 Total151732
25
Fisher’s exact test An example SDT A314 B224 538 SDT A404 B134 538 SDT A134 B404 538 SDT A224 B314 538
26
Fisher’s exact test Survivers: –a, b, c, d, e Deaths: –f, g, h Table 1 can be made in 5 ways Table 2: 30 Table 3: 30 Table 4: 5 70 ways in total SDT A314 B224 538 SDT A404 B134 538 SDT A134 B404 538 SDT A224 B314 538
27
Fisher’s exact test Survivers: –a, b, c, d, e Deaths: –f, g, h Table 1 can be made in 5 ways Table 2: 30 Table 3: 30 Table 4: 5 70 ways in total The properties of finding table 2 or a more extreme is:
28
Fisher’s exact test SDT A f 11 f 12 r1r1 B f 21 f 22 r2r2 c1c1 c2c2 n SDT A314 B224 538 SDT A f 11 f 12 r1r1 B f 21 f 22 r2r2 c1c1 c2c2 n SDT A404 B134 538
29
Chi Squared Table
30
Odds and odds ratios Odds, p is the probability of an event Log odds / logit
31
Odds The probability of coughs in kids with history of bronchitis. p = 26/273 = 0.095 o = 26/247 = 0.105 The probability of coughs in kids with history without bronchitis. p = 44/1046 = 0.042 o = 44/1002 = 0.044 BronchitisNo bronchitisTotal Cough26 (a)44 (b)70 No Cough247 (c)1002 (d)1249 Total27310461319
32
Odds ratio The odds ratio; the ratio of odds for experiencing coughs in kids with and kids without a history of bronchitis. BronchitisNo bronchitisTotal Cough26; 0.105 (a)44; 0.0439 (b)70 No Cough247; 9.50 (c)1002; 22.8 (d)1249 Total27310461319
33
We could take ln to the odds ratio. Is ln(or) different from zero? 95% confidence (assumuing normailty) Is the odds ratio different form 1? BronchitisNo bronchitisTotal Cough26 (a)44 (b)70 No Cough247 (c)1002 (d)1249 Total27310461319
34
Confidence interval of the Odds ratio ln (or) ± 1.96*SE(ln(or)) = 0.37 to 1.38 Returning to the odds ratio itself: e 0.370 to e 1.379 = 1.45 to 3.97 The interval does not contain 1, indicating a statistically significant difference BronchitisNo bronchitisTotal Cough26 (a)44 (b)70 No Cough247 (c)1002 (d)1249 Total27310461319
35
Odds ratios in SPSS (Risk) SPSS uses binomial distributions not normal as shown here
36
McNemar table 13-13 Table 13.13Severe colds at age 14 YesNoTotal Severe colds at age 12 Yes212144356 No256707963 Total4688511319
37
McNemar in SPSS table 13-13
38
Exercises http://person.hst.aau.dk/cdahl/statM7/
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.