310 likes | 586 Vues
Chi-Square. Test of significance for proportions FETP India. Competency to be gained from this lecture. Test the statistical significance of proportions using the relevant Chi-square test. Key elements. Principles of the Chi-square Comparison of a proportion with an hypothesized value
E N D
Chi-Square Test of significance for proportions FETP India
Competency to be gained from this lecture Test the statistical significance of proportions using the relevant Chi-square test
Key elements • Principles of the Chi-square • Comparison of a proportion with an hypothesized value • Chi-square for 2x2 tables • Chi-square for m x n tables • Testing dose-response with Chi-square
Chi-square: Principle • The Chi–square test examines whether a series of observed (O) numbers in various categories are consistent with the numbers expected (E) in those categories on some specific hypothesis (Null hypothesis) • O= Observed value • E= Expected value Principle
How the Chi-square works in practice • X2 = 0 when every observed value is equal to the expected value • As soon as an observed value differs from the expected value, the X2 exceeds zero • The value of the X2 is compared with a tabulated value • If the calculated value of X2 exceeds the tabulated value under the column p = 0.05, the null hypothesis is rejected Principle
Chi-square table:Percentage points of X2 distribution Principle
Use of Chi-square to compare a proportion with a hypothesized value • The reported coverage for measles in a sub-center is 80% • The chief medical officer of the district suspects that this coverage could be overestimated • Validation survey with 80 children selected using simple random sampling • 56/80 (70%) vaccinated Hypothesized value
Interpretation of the Chi-square • The calculated value of X2 (i.e., 5) with 1 degree of freedom exceeds the table value (3.84) at 5% level • Hence, the medical officer rejects the null hypothesis that the coverage is 80% Hypothesized value
Use of Chi-square to compare proportions between two samples • Cholera outbreak affecting a village • Cases clustered around a pond • Hypothesis generating interviews suggest that many case-patients washed their utensils in the pond • The investigator compares those who washed their utensils with the others in terms of cholera incidence 2x2 tables
Incidence of diarrhea (cholera) among persons who washed utensils in a pond and others, South 24 Parganas, West Bengal, India, 2006 2x2 tables
Chi-square to test the difference in the two proportions • The proportion of persons affected by cholera in the exposed and unexposed groups differ • Three steps to test whether this difference is significant: • Calculate expected values • Compare observed and expected to calculate the Chi-square • Compare the Chi-square with tabulated value 2x2 tables
Step 1: Calculate the expected values (1/2) • 51% of the population became sick • If the cholera occurred at random, these proportions apply to the two groups, exposed and unexposed 2x2 tables
Step 1: Calculate the expected values (2/2) • 51% of the 56 who washed utensils (=28) should have been sick • All other numbers can de deducted by subtraction (one degree of freedom) 2x2 tables
Step 2: Compare observed and expected values 2x2 tables
Step 3: Interpretation of the Chi-square • The calculated value of X2 (i.e., 68.6) with 1 degree of freedom exceeds the table value (3.84) at 5% level • Hence, we reject the Null hypothesis that the attack rate of cholera is equal in the exposed and unexposed group • This may suggest washing utensils in the pond is a source of infection if other elements of the investigation also support the hypothesis 2x2 tables
Simpler Chi-square formula 2x2 tables
Application of simpler Chi-square formula to the cholera example 2x2 tables
Corrected Chi-square formula Note that the corrected value will always be smaller than the uncorrected which tends to exaggerate the significance of a difference 2x2 tables
Example of a 4x2 table Degrees of freedom = (Nbr of rows-1) x (Nbr of columns-1)=(4-1)x(2-1)= 3x1=3 N x N tables
Calculation of the Chi-square for a 4x2 table • Overall prevalence of cataract = 9.6% • Apply 9.6% proportion to all groups to calculate expected values • Use generic formula N x N tables
Interpretation of a Chi-square for a m x n table • The Chi-square tests the overall Null hypothesis that all frequencies are distributed at random • If the Null hypothesis is rejected, it means the distribution is heterogeneous • It is not possible to: • “Attribute” the difference to a particular group • Regroup categories according to differences observed and test with a 2x2 table (i.e., post-hoc analysis) • Test with multiple 2x2 tables (i.e., multiple comparisons) N x N tables
Key rule about Chi-square • Chi- square test should be applied on qualitative data set out in the form of frequencies • Chi– square test should not be done on: • Percentages • Rates • Ratios • Mean values N x N tables
Limitations to the use of Chi-square • When sample size is small, other exact tests (e.g., Fisher exact test) are preferred and calculated with computer • N < 30 • Expected value < 5 • When several expected cell frequencies are less than one, it is better to amalgamate rows / columns N x N tables
Testing a dose-response relationship with a Chi-square • Overall m x n Chi-square • Tests the null hypothesis that the odds ratios do not differ • No particular conditions needed • Overall test, easy to compute • Rough conclusions • Chi-square for trend Dose-reponse
Exposure to injections with reusable needles and acute hepatitis B, Thiruvananthapuram, Kerala, India, 1992 Heterogeneous exposures categories Overall 3x2 Chi-square : 42, 2 degrees of freedom, p<0.00001 Dose-reponse
Testing a dose-response relationship with a Chi-square • Overall m x n Chi-square • Chi-square for trend • Tests for a linear trend for the increase of the odds ratios with increased levels of exposure • Requires equal interval in the exposure categories • Can be calculated on a computer • Refined conclusions Dose-reponse
Odds of typhoid according to raw onion consumption, Darjeeling, West Bengal, India, 2005-2006 Homogeneousexposures categories Chi-square for trend: 16.8; P-value: 0.0004 Dose-reponse
Take home messages • The Chi-square compares expected and observed counts • The Chi-square can compare an actual proportion with a theoretical one • The Chi-square is the basic test to compare proportions in epidemiological 2x2 tables • The Chi-square can be used also as a global test for m x n tables • Specific Chi-squares can be used to test for dose-response effect