﻿ Pearson's Chi-Square Test

# Pearson's Chi-Square Test

Statistics > Basic Statistics > Chi-Square > Pearson's Test

Pearson's chi-square test on a two-dimensional contingency table.

The Pearson chi-square statistic for two-way tables involves the differences between the observed and expected frequencies, where the expected frequencies are computed under the null hypothesis of independence. The chi-square statistic is computed as

where, for r rows and c columns of n observations,

nij denote the cell frequency in the ith row and the jth column

is an estimated expected frequency

When the row and column variables are independent, Qp has an asymptotic chi-square distribution with (r-1)×(c-1) degrees of freedom. For a 2×2 table, the Pearson chi-square is also appropriate for testing the equality of two binomial proportions or, for r×2 and 2×c tables, the homogeneity of proportions.

### Dialog box items

Rows:
Select the variables displayed in rows in the crosstabulation. Selected variables should be factors with at least two levels. A crosstabulation is produced for each combination of row and column variables.

Columns:
Select the variables displayed in columns in the crosstabulation. Selected variables should be factors with at least two levels. A crosstabulation is produced for each combination of row and column variables.

DataSet is a Contingency Table:
Select if the data set specified is a contingency table.

Report:
The display of outputs of VisualStat.

### Data

To use Cross Tabulation, your data should be categorical. To define the categories of each table variable, use values of a numeric or short string (eight or fewer characters) variable. For example, for gender, you could code the data as 1 and 2 or as male and female.

### Statistics

Measures of Association:
Describes the association between the two variables of the contingency table

oCramer's V: Check to display Cramer's V coefficient.

oPhi Coefficient: Check to display Phi Coefficient.

oContingency Coefficient: Check to display Contingency Coefficient.

oKappa Coefficient: Check to display Kappa Coefficient.

oObserved values: Check to display each cell's observed count.

oExpected values: Check to display each cell's expected count.

oCell Chi-Square: Check to display each cell's contribution to the overall chi-square statistic.

oCell Ch2 Signed Percent: Check to display the signed cell's contribution percentage to the overall chi-square statistic.

### Options

Apply Continuity Correction :
Check to apply Yates’ correction for continuity.

Confidence Level:
Enter the level of confidence desired. Enter any number between 0 and 100. Entering 90 will result in a 90% confidence interval. The default is 95%.

### Example

The data show test scores for 34 children in two class (1 or 2). The child's gender ("male" or "female") and grade (4, 5, or 6) is also recorded.

1.Open the DataBook summary.vstz

2.Select the sheet crosstab

3.Choose the tab Statistics, the group Basic Statistics and the command Pearson's Test

4.In Rows, select Gender. In Columns, select Class

5.Click OK

Report window output

Pearson's Chi-Square Test

without continuity correction

Null hypothesis under test >>>  Independence of the rows and columns

data:  Gender and Class from data sheet summary.vstz

NB                 34

Pearson's Chi2     4.2500

Degree of freedom  1

p-value            0.0393

alpha-level        0.05

Critical Value     3.8415

Conclusion         Reject the Null Hypothesis

i.e. there is a general association between the row variable and the column variable at the 5% level.