Chi-Square Calculator

You can type any rows/columns of numbers separated by space or comma. You can also copy and paste any rows/columns of numbers from a table (excel, word, or other software). An example is listed below:

5 7 8 6
6 8 7 5

      
Chi-square Value:
Degrees of Freedom:
P value:
Rows X Columns:

Chi-Square Test Introduction

Chi-square test is used only for categorical variables. The summary table should only include zero or positive integers. If the total frequency is under 20 and any cell has an expected frequency less than 5, the Chi-squared approximation might be incorrect. If there are at least 2 rows and 2 columns, the null hypothesis (H0) is that the row variable and the column variable are independent. And the alternative hypothesis (H1 or Ha) is that the row variable and the column variable are dependent. If there is only 1 row or only 1 column, the null hypothesis (H0) is that each category has an equal likelihood. And the alternative hypothesis (H1 or Ha) is that all categories do not have an equal likelihood.

Chi-Square Test Example

In a final exam, 5 girls and 6 boys got A, 7 girls and 8 boys got A-, 8 girls and 7 boys got B, 6 girls and 5 boys got B-. In order to test whether gender and final exam score are independent, we would input "5 7 8 6" in the first row for girls, and "6 8 7 5" in the second row for boys.
We get a chi-square value of 0.3152 with 3 degrees of freedom, and the associated p value is at 0.9572. As p>0.05, we can not reject the null hypothesis that gender and final exam score are independent.