# Chi square test with the help of SPSS

A Chi square (X2) statistic is used to investigate whether distributions of categorical variables differ from one another. Categorical variables like; the gender of the sample population could be either male or female.

## When to apply chi square test?

If the researcher thinks that 2 variables are related, the null hypothesis would be that they are not related. Another way of stating the null hypothesis is that the 2 variables are independent.

For example, if we want to test if the Gender of a person is related to his/her income

### Chi square test in SPSS

When we click on the “OPTION” dialogue box shown on the right-hand side appears, where the researcher has the option to choose “Descriptive” under “Statistics” which would reflect the mean and standard deviation. The researcher can both insert specific values for the expected range as were as the expected values. However, no range or value is specified then it is taken from the data itself, which is an equal percentage division for all the categories.

## Example 1

A simple Chi square test conducted on determining the number of males [H2] and females in the sample population reflected the following results (See Table 1 given below). The software assumes that the no. of people will be equal in both categories (i.e. there will be an equal number of males and females in this group).

“Observed N” represents the actual result, i.e. number of males and females in the group

“Expected N” displays the assumed result (i.e. equal number of males and females in the group).

The confidence interval is set at 99%. This means that there is a 99% probability that there is an unequal number of males and females in the group. Therefore “sig” value should be <0.01.

In table 1 Observed ‘N’ and Expected ‘N’ are reflected and the difference between the two is shown in Residual. The Chi Square value is presented in Table 2 along with sig which was found to be .002. This satisfies our assumption that there is an unequal number of males and females in the group. Therefore the null hypothesis is rejected.

## Example 2

As an example of testing whether 2 variables are independent, look at the table below, a cross-tabulation of highest educational attainment [degree] and perception of life’s excitement [life] based on the data.

- Null Hypothesis: There is no link between the highest degree attained and the level of excitement in life
- Alternative hypothesis: There is a link between the highest degree attained and the level of excitement in life

From the row %, you see that the % of people who find life exciting is not exactly the same in the 5-degree groups, although it is fairly similar for the 1st 2-degree groups. Slightly less than half of those with less than a high school education or with a high school education find life exciting. However, you see that there is a substantial difference between those with some exposure to college and those with a post-graduate degree. Of those respondents, almost 2/3 find that life is exciting.

## Interpretations

We use the chi-square test within cross-tabulation. This determines if your observed results are unlikely that the 2 variables are independent in the population. 2 variables are independent if knowing the value of one variable tells nothing about the value of the other variable. The level of education one attains and one’s perception of life are independent if the probability of any level of educational attainment/perception of life combination is the product of the probability of that level of educational attainment times the probability of that perception of life. Since the null hypothesis is false we observe different perceptions about the level of life excitement across people with different degrees. For example in Table 2, we observe 74.4% of excited people with bachelor’s degrees (See Table 3 Encircled in Red).

From the table below, we are only concerned with the Pearson Chi-Square value i.e. 34.750. In addition, we can see that the observed significance level for the Pearson chi-square is 0.000. Therefore so you can reject the null hypothesis that level of educational attainment and perception of life are independent.

Priya is the co-founder and Managing Partner of Project Guru, a research and analytics firm based in Gurgaon. She is responsible for the human resource planning and operations functions. Her expertise in analytics has been used in a number of service-based industries like education and financial services.

Her foundational educational is from St. Xaviers High School (Mumbai). She also holds MBA degree in Marketing and Finance from the Indian Institute of Planning and Management, Delhi (2008).

Some of the notable projects she has worked on include:

- Using systems thinking to improve sustainability in operations: A study carried out in Malaysia in partnership with Universiti Kuala Lumpur.
- Assessing customer satisfaction with in-house doctors of Jiva Ayurveda (a project executed for the company)
- Predicting the potential impact of green hydrogen microgirds (A project executed for the Government of South Africa)

She is a key contributor to the in-house research platform Knowledge Tank.

She currently holds over 300 citations from her contributions to the platform.

She has also been a guest speaker at various institutes such as JIMS (Delhi), BPIT (Delhi), and SVU (Tirupati).

## Discuss