You are on page 1of 3

Chi-Square Test of Independence

In order to test if there exist a significant relationship between two nominal variables, the

Chi-Square test of independence, also known as the Pearson Chi-Square test, is used. Chi-square

test of independence compares the frequency of each category for one nominal variable across the

categories of another nominal variable (McHugh, 2013). The data that will be obtained can be

presented in a contingency table where each of its row corresponds to a category for one variable

and each of the column represents the category for the other variable. Crosstabulation presents the

distributions of two categorical variables simultaneously. The intersections of these categories are

shown in the cells of the table. This assesses whether an association is present between two

variables through observation of common pattern of responses in the cells to the pattern that would

be expected if the variables are independent from one another. This test procedure is appropriate

if the sampling method is a simple random sampling, the variables are nominal, and the sample

data is displayed in a contingency table. If a research wants to determine the relationship between

sex, male vs. female, and their empathy, this statistical test should be used. The null hypothesis in

this statistical test is that there is no relationship between the independent and dependent variable.

Meanwhile, the alternative hypothesis would be the other way around; that is, there is a significant

relationship between the variables (Statistics Solutions, 2015).

To calculate the chi-square statistic available, the expected value of the two nominal

variables must be calculated. This can be done through using the formula:

∑𝑐𝑘=1 𝑂𝑖,𝑗 ∑𝑟𝑘=1 𝑂𝑘,𝑗


𝐸𝑖,𝑗 = (Equation 1)
𝑁

Where: 𝐸𝑖,𝑗 is the expected value;

∑𝑐𝑘=1 𝑂𝑖,𝑗 is the sum of the ith column;

∑𝑟𝑘=1 𝑂𝑘,𝑗 is the sum of the kth row; and


N is the total number

After this, the following formula must be applied to obtain the value of the Chi-Square

test of independence:

(𝑂𝑖,𝑗 −𝐸𝑖,𝑗 )2
𝑥2 = (Equation 2)
𝐸𝑖,𝑗

Where: 𝑥 2 is the Chi-Square Test of Independence;

𝑂𝑖,𝑗 is the observed value of two nominal values; and

𝐸𝑖,𝑗 is the expected value of the two variables.

In addition, the degree of freedom can be calculated using:

DF = (r – 1)(c – 1) (Equation 3)

Where: DF is the degree of freedom;

r is the number of rows; and

c is the number of columns

The process of hypothesis testing for chi-square test of independence is similar to that of

the ANOVA, wherein the test statistic is computed and then compared to a critical value. This

critical value is determined by the level of significance, usually at 0.05 and the degrees of freedom.

The formula for degrees of freedom is shown above. If the observed chi-square test statistic is

greater than the critical value, then the null hypothesis is rejected. Otherwise, the null hypothesis

is accepted. An example of chi-square test done on a statistical software is shown in Figure 1.


Figure 1. Chi-square test sample result

There are some considerations when using this Chi-Square statistic. Based on how it is

calculated, it is extremely sensitive to the sample size. When the sample size is too large, that is

approximately 500, almost any small difference between the expected and observed values will be

considered significant. In addition to this, it is sensitive to the distribution within the cells.

Fortunately, this can be resolved using categorical variables with a limited number of categories,

for example, combining categories if possible, to have a smaller table.

In this study, the researchers used this test statistic to determine whether there is a

significant relationship between the Facebook usage of the respondents and their self-esteem.

References:

Statistic Solutions. (2015). Using chi-square statistic in research. Retrieved on 10 October 2019

from https://www.statisticssolutions.com/using-chi-square-statistic-in-research/

McHugh, M. L. (2013). The Chi-square test of independence, Biochem Med 23(2), pp. 143-149.

doi: 10.11613/BM.2013.018

You might also like