When we want to find out the statistical significance between two variables, then the chi-square test is used to understand the deviation between observed and expected frequency and divided by the expected frequency. Probability of 0: It indicates that both categorical  variables are dependent Probability of 1: It shows that both variables are independent. Probability less than 0.05: It indicates that the relationship between the variables is significant at 95% confidence. The chi-square test statistic for a test of independence of two categorical variables is found by: Square of X = Sum[Square of (O - E) / E] Where O – Observed frequency E – Expected frequency under the null hypothesis We use this between two Categorical variables.