I am running a Chisquare test using CHIDIST function in Excel. My observed and expected values are not identical however i get result 0 (zero). There are 75 observed values so I am using 74 freedom points. Not sure what I am doing wrong, any assistance would be appreciated.


The description of the CHIDIST Excel function says:

Returns the right-tailed probability of the chi-squared distribution. The $\chi^2$ distribution is associated with a $\chi^2$ test. Use the $\chi^2$ test to compare observed and expected values.

This means that the p-value displayed by the function will be lower when the observed valuer are far away from the expected ones; and the p-value will be $1$ if the observed values match exactly the expected values. Therefore, since you are getting a very small p-value (displayed as zero due to the rounding done by Excel), I deduct that your data is distinct from the expected distribution.

| cite | improve this answer | |
  • $\begingroup$ Thanks for the reply. I did the chi square test as sum of (observed-expected)^2/expected and the number i got is quite big - around 2,700,000 which I am not sure if makes sense. Regarding the rounding I don't know how small the number would be for excel or numbers in mac to not show it as I tried upto 30decimals and still result is zero. Is there any way to see the actual number? I $\endgroup$ – DimitrisM Oct 1 '19 at 15:34
  • $\begingroup$ @DimitrisM : 2.7 million is a lot! Are you sure you haven't made a mistake? For 74 degrees of freedom, a p-value of $0.001$ would be attained for $\chi^2$ around $117$; and a p-value of $10^{-30}$ would be attained for $\chi^2$ around $310$. $\endgroup$ – Ertxiem - reinstate Monica Oct 1 '19 at 22:25
  • $\begingroup$ It does seem a lot to me also but not sure where I got it wrong. I calculate x square by summing the squared differences of observed minus expected values and dividing the result by expected value, for each row. $\endgroup$ – DimitrisM Oct 2 '19 at 14:24
  • $\begingroup$ The link to the data I am using is this if you want to have a look. The observed/estimated values are flu count incidents per US county. github.com/DimitrisMertikas/Chisquaretesting $\endgroup$ – DimitrisM Oct 2 '19 at 15:14
  • $\begingroup$ @DimitrisM: I've checked your data and I got $\chi^2 = 2\ 189 \ 770.58$ for $df=74$. So, It's natural to have such a low p-value. Looking at the data, you see counties with an incidence of nearly $43\%$, and others with incidences of $0.01\%$, thus, the p-value is telling that there are significant differences between counties, which is according to what is observed. $\endgroup$ – Ertxiem - reinstate Monica Dec 17 '19 at 22:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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