The chi-square test analyzes categorical data: the goodness-of-fit test checks whether observed frequencies follow a theoretical distribution or specified proportions, the independence test checks whether two categorical variables are independent in a contingency table, and the homogeneity test checks whether several populations share the same category distribution. The core statistic is χ² = Σ(Oᵢ−Eᵢ)²/Eᵢ, where O is the observed frequency and E the expected frequency under the null hypothesis; the larger χ², the more the data deviate from the hypothesis.
Use goodness-of-fit for a single row of categories (defect-type proportions, dice uniformity); independence for a rows-by-columns table such as defect type versus production line; and homogeneity for the same table shape when comparing populations, such as the conforming structures of three plants. The three methods share the same statistic, and the tool recognizes the data shape automatically.
Select the test type and enter the frequencies as counts (never percentages), and the tool computes χ², degrees of freedom and p-value, outputs the expected-frequency table and standardized residuals, and adds association-strength measures such as Cramer's V or φ. Cells with a standardized residual above about 2 in absolute value are the main sources of the difference and are a good lead for improvement.
χ² = Σ(Oᵢ−Eᵢ)²/Eᵢ with degrees of freedom (r−1)(c−1) for tables and k−1 for goodness-of-fit. Assumptions: counts, independent observations, at least 80% of expected frequencies ≥ 5 and all ≥ 1; otherwise merge categories, increase the sample, or use Fisher's exact test. Very large samples make weak associations significant, so always check the effect size.