Chi-square Goodness-of-fit Test

Tests whether observed counts follow the expected proportions. It calculates χ² = Σ(observed − expected)² ÷ expected and the upper-tail p-value from the chi-square distribution with k − 1 degrees of freedom. The expected values are read as proportions and rescaled to the total of the observed counts, so 10, 10, 10 and 1, 1, 1 give the same result.