Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 12

Chi Square Test

S. Govindaraju Professor of Statistics

Gitanjali 1

At the end of this session you will be able to:


Prepare a contingency table
Realise which study designs are suitable for applying the chi square test Understand the assumptions / limitations of the chi square test.

Gitanjali 2

What is it?
Test of proportions Non parametric test Dichotomous variables are used Tests the association between two factors e.g. treatment and disease gender and mortality
Gitanjali 3

Associations and Causal Associations


Relationship between variables Not statistically associated Statistically associated

Non-causal

Causal

Gitanjali 4

Indirectly causal

Directly causal

Contingency Table
Row Attribute Column Attribute | Column category 1 Column category 2 Column category 3 Row category 1 Row category 2 Row category 3 Row category 4

Gitanjali 5

Null Hypothesis : There is no association (relation) between row and column attributes Alternate Hypothesis: There is association between the row and row attributes

Level of significance : Normally 0.05 or 0.01


Degrees of freedom : (No. of rows -1) x (No. of columns 1)

Gitanjali 6

Contingency (2X2) table


Exposure Outcome

Yes

No

Yes
No

Enter number of subjects not percentages, ratios, averages etc.,

Gitanjali 7

Each subject can be entered only once

Out of 40 women who had uterine cancer, 30 claimed to have used estrogens. Out of 60 women without uterine cancer 10 claimed to have used estrogens.
Exposure (Use of estrogens)

Outcome (Having Uterine


Cancer)

Total

Yes Yes No
Gitanjali 8

No

30(O1) 10(O3)
40

10(O2) 50(O4)
60

40 60 100

Total

Null Hypothesis : There is no association between exposure and outcome Alternate Hypothesis: There is association between exposure and outcome
Expected frequencies : e 1 = 40 x 40 / 100 = 16; O1 = 30 e 2 = 60 x 40 / 100 = 24: O2 = 10 e 3 = 40 x 60 / 100 = 24; O3 = 10 e 4 = 60 x 60 / 100 = 36; O4 = 50 Chi-square value =
( O1 e 1)2/e1 + (O 2 e2)2/e2 + (O 3- e3)2/e3 + (O 4 e4)2 /e4

Chi-square value : (30 16)2/16 + (10 24)2/24 + (10-24)2/24 + (50 36)2/36 = 34.028
Degrees of freedom: (no. of rows 1) x (no. of columns -1) = ( 2 1) x ( 2 1) = 1

Gitanjali 9

Chi-Square Table value


Probability of exceeding the critical value 0.10 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Gitanjali 10

0.05

0.025

0.01 6.635 9.210 11.345 13.277 15.086 16.812 18.475 20.090 21.666 23.209 24.725 26.217 27.688 29.141 30.578

0.001 10.828 13.816 16.266 18.467 20.515 22.458 24.322 26.125 27.877 29.588 31.264 32.910 34.528 36.123 37.697

2.706 4.605 6.251 7.779 9.236 10.645 12.017 13.362 14.684 15.987 17.275 18.549 19.812 21.064 22.307

3.841 5.024 5.991 7.378 7.815 9.348 9.488 11.143 11.070 12.833 12.592 14.449 14.067 16.013 15.507 17.535 16.919 19.023 18.307 20.483 19.675 21.920 21.026 23.337 22.362 24.736 23.685 26.119 24.996 27.488

Inference : Since Chi-Square calculated value is greater than the table, reject the hypothesis, the null hypothesis will have to be rejected There is association between exposure and outcome Women who take estrogen are more likely to get uterine cancer and women who do not take estrogen are non-likely to get uterine cancer

Gitanjali 11

Assumptions / Limitations
Data is from a random sample. A sufficiently large sample size is required (at least 20) Actual count data (not percentages) Adequate cell sizes should be present. (>5 in all cells- if less number present apply Yates correction) Observations must be independent. Does not prove causality.
Gitanjali 12

You might also like