3.2.1 - Implementing the Analysis in R and SAS
We are interested in answering the following questions for the Coronary Heart Disease example from the introduction: Is having a coronary heart disease independent of the cholesterol level in ones body? Is there any evidence of a relationship/association between cholesterol and heart disease?
Conclusion: We reject the null hypothesis of independence because of the big values of the chi-square statistics. Notice the degrees of freedom are equal to 3 = (4-1)(2-1), and thus the p-value is very low. Therefore, through the X2 test for independence, we have demonstrated beyond a reasonable doubt that a relationship exists between cholesterol and CHD.
A good statistical analysis, however, should not end with the rejection of a null hypothesis. Once we have demonstrated that a relationship exists, we should describe that relationship. To do this we consider computing and evaluating the (i) residuals, (ii) measures of association, and (iii) partitioning chi-square.