I have a question with applying Chi-squared tests to a given set of data. Let's say that my data is numbers of different-colored MM's in a bag.

Suppose there are 6 red, 4 blue, 8 orange, 2 green, 10 purple, and 6 brown for a total of 36, while the expected value is 6 for each.

The chi-squared test for this data, after calculating $\sum\frac{(O-E)^2}{E}$, gives 6.67.

However, if I converted the discrete numbers into percentages/decimals such that the total is 1 (e.g. blue is 0.111 and expected is 0.167), the chi-squared value is different: 0.185.

I think this has to do with the fact that when the numbers are effectively scaled down, the numerator, which reflects the square of the differences between observed and expected, decreases more than the denominator, which is merely the single power of expected. But which way of performing the chi-squared test is correct?

  • 1
    $\begingroup$ I'm sure this has been asked and answered a couple of times before, though I wasn't able to find one with a quick search. $\endgroup$
    – Glen_b
    Commented Feb 21, 2017 at 23:51

1 Answer 1


The O and E in your formula refer to counts. The formula is not applicable to proportions. The value of 0.185 that you compute is not a "chi-squared value". It is possible to rewrite the formula to take proportions, but you end up with a different formula to the one that you have used.

  • $\begingroup$ Out of curiosity, what is such a formula? $\endgroup$
    – Yunfei Ma
    Commented Feb 22, 2017 at 0:14
  • $\begingroup$ Let $O = oN$ and $E = eN$, where $o$ nd $e$ are the observed and expected proportions respectively, and then substitute these into the formula in the question, and simplify. $\endgroup$
    – Tim
    Commented Feb 22, 2017 at 3:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.