Chi-Square Test

<<< Click here to understand Proc Freq

Consider the same data as we have used for understanding Proc Freq.

Download the data using following link, we will use the same for almost all tests:

Data for tests

Download the data, keep it at a location and assign the location to library "a" in SAS.

Chi-Square Test is used to test the independence ... or in another words, dependence of two samples. If they are not independent, then of course they would be dependent.

It  is a non-parametric test which means that is it used not on continuous but categorical (discrete) variables. T-test and ANOVA on the other hand are parametric tests.

The null hypothesis in this test is that the samples are independent. Let us consider the two variables from the data - 1. Type of School, 2. Type of Program

Suppose we hypothesize that these two samples are independent.

H0:  Samples are independent
H1:  Samples are not independent and hence dependent

Proc freq data = a.Sample_1;
Table schtyp *  prog / chisq expected;

Here expected frequency is calculated using Row Total * Column Total / Overall Frequency.

The Chi-Square test is used in the background of HL test of Logistic Regression.

Enjoy reading our other articles and stay tuned with ...

Kindly do provide your feedback in the 'Comments' Section and share as much as possible.

No comments:

Post a Comment

Do provide us your feedback, it would help us serve your better.