Chi Square Test for Independence

Chi Square Test for Independence

Chi Square Test for Independence

Description

Chi Square Test for Independence determines whether two categorical variables are related or independent.

Why to use

To test the independence or association between categorical variables.

When to use

When the dataset contains at least two categorical variables.

When not to use

On Continuous data

Prerequisites

The data should be categorical.

Input

Two categorical variables

Output

  • Chi Square Statistic
  • Observed Frequency Table and Expected Frequency Table for the selected categorical Variables

Statistical Methods used

Limitations

It can be used only on categorical data.


The Chi Square Test for Independence is a hypothesis test. It compares two categorical variables to check if they are related to each other or not. It uses a contingency table (cross table) for the analysis of data. In a cross table, the data is classified according to the two categorical variables. The categories for one variable appear in the rows, while the categories for another variable appear in columns. Each cell represents the total count of cases for a specific pair of categories.