Data Analysis Tools – Running a Chi-Square Test of Independence

Research Question for the Chi-Square Test:

Is higher income associated with longer life from a global perspective?

Quantitative explanatory and response variables were changed to categorical variables for running the Chi-Square Test.

Null Hypothesis (H0)

There is no relationship between income level and life expectancy. They are independent.

Alternative Hypothesis (Ha)

There is a relationship between income level and life expectancy. They are not independent.

 

SAS Program for the Chi-Square Test

Please click the following images for larger images. Syntax for the Chi-Square Test is highlighted in yellow.

20151227 Chi Square SAS Screenshot 001 20151227 Chi Square SAS Screenshot 002 20151227 Chi Square SAS Screenshot 003 20151227 Chi Square SAS Screenshot 004 20151227 Chi Square SAS Screenshot 005 20151227 Chi Square SAS Screenshot 006 20151227 Chi Square SAS Screenshot 007 20151227 Chi Square SAS Screenshot 008 20151227 Chi Square SAS Screenshot 009 20151227 Chi Square SAS Screenshot 010 20151227 Chi Square SAS Screenshot 011 20151227 Chi Square SAS Screenshot 012 20151227 Chi Square SAS Screenshot 013 20151227 Chi Square SAS Screenshot 014 20151227 Chi Square SAS Screenshot 015

 

Output for the Chi-Square Test

 20151227 Chi Square SAS Output 001 20151227 Chi Square SAS Output 002 20151227 Chi Square SAS Output 003 20151227 Chi Square SAS Output 004 20151227 Chi Square SAS Output 005 20151227 Chi Square SAS Output 006 20151227 Chi Square SAS Output 007 20151227 Chi Square SAS Output 008 20151227 Chi Square SAS Output 009 20151227 Chi Square SAS Output 010

 

Interpretation for the Chi-Square Test

Five Income Groups:

Group 1 = US$0 – US$559 (Lowest 20%)

Group  2 = US$560 – US$1,845 (21%-40%)

Group  3 = US$1,846 – US$4,700 (41%-60%)

Group  4 = US$4,701 – US$13,578 (61%-80%)

Group  5 = US$13,579 – US$105,148 (81%-100%/Highest 20%)

Two Life Expectancy Groups:

Group  1 = 40.001 – 60 years of age

Group  2 = 60.001 – 90 years of age

When examining the association between average life expectancy (the response variable is categorized) and income per person (the explanatory variable is categorized), a Chi-Square Test of Independence revealed that among 176 countries, citizens of those with higher income were likely to live longer compared to citizens of those with lower income, Chi-Square (X2) = 109.1614, 4 degree of freedom (df), p<0.0001. Per the Chi-Square table, 100% of countries in the highest income group have the average life expectancy of 60.001 to 90 years old. 96.97% of countries in Income Group 4 and 75.68% in Income Group 3 have the average life expectancy of 60.001 to 90 years old. On the other hand, 63.89% in Income Group 2 and 100% in the lowest income group have the average life expectancy of 40.01 to 60 years of age.

The degree of freedom (df) is the number of levels of the explanatory variable minus 1. In this case, the df is 4 income per person which has 5 levels (df 5-1=4).

 

Interpretation for the Post Hoc Chi-Square Test results

20151227 Chi Square p value table

Post hoc comparisons of rates of income levels (5 categories) by life expectancy (2 categories) revealed that higher income levels were seen among those who live longer.

In this case, the adjusted Bonferroni P Value is 0.005 with 10 comparisons.  The Post Hoc Chi-Square Test showed the following:

*Income Group 1 (Lowest 20%) is significantly different from Income Group 2, 3, 4 and 5.

*Income Group 2 (21%-40%) is significantly different from Income Group 3, 4 and 5.

*Income Group 3 (41%-60%) is significantly different from Income Group 5.

*Income Group 4 (61%-80%) is NOT significantly different from Income Group 5 (Highest 20%), while Income Group 3 is NOT significantly different from Income Group 4.

Post Hoc Chi-Square Test demonstrated that countries with higher income per person have significantly more average number of years a newborn child would live (more than 60 years old). According to the Chi Square table, there are 100% of countries in the highest income group, 96.97% in Income Group 4, and 75.68% in Income Group 3 with citizens live longer than 60 years of age in average. However, there is only 36.11% in Income Group 2 with citizens live more than 60 years in average.  There is no country in the lowest income group has the average life expectancy of more than 60 years.

On the other hand, there are 100% of countries in the lowest income group, 63.89% in Income Group 2, and 24.32% in Income Group 3 with citizens live 60 years of age or less in average. Only 3.03% in Income Group 4 and no country in the highest income group with citizens live 60 years of age or less in average.