Pearson's Chi-Square Test

The chi-square test performs a Pearson's chi-square test on a two-dimensional contingency table. This test is relevant to several types of null hypothesis: statistical independence of the rows and columns, homogeneity of groups, etc. The appropriateness of the test to a particular null hypothesis and the interpretation of the results depend on the nature of the data at hand, in particular on the sampling scheme.

The returned p value should be interpreted carefully. Its validity depends heavily on the assumption that the expected cell counts are at least moderately large; a minimum size of five is often quoted as a rule of thumb. Even when cell counts are adequate, the chi-square is only a large-sample approximation to the true distribution of X-squared under the null hypothesis.

If the data set is smaller than is appropriate for a chi-square test, the Fisher's exact test may be preferable.

To perform Pearson's chi-square test

Choose Statistics __image\ebd_ebd53.gif Compare Samples __image\ebd_ebd54.gif Counts and Proportions __image\ebd_ebd55.gif Chi-Square Test. The dialog shown below appears.

__image\pearson.gif

Pearson's Chi-Square Test has the following options:

Data Set

Specify a data set.

Variable 1

Specify the factor column that contains the first classification variable. It must have at least two levels.

Variable 2

Specify the factor column that contains the second classification variable. This variable must have at least two levels.

Data is a Contingency Table

Select if the data set specified is a contingency table.

Apply Yates' Continuity Correction

Select to apply Yates' correction for continuity. See the online Help for chisq.test for an algebraic definition of the continuity correction.

Save As

Enter the name for the object in which to save the results of the analysis.

Print Results

Select this to print out the results of the analysis in the designated output window.

Related S-PLUS language functions

chisq.test, print.htest, menuChisquare