Forum Discussion

JennyLMace's avatar
JennyLMace
Copper Contributor
Mar 31, 2024

#NUM! error with chi-squared test statistic

 

 

Dear All,
I have been following the instructions on this YouTube video for executing the chi-squared test in Excel. It has been working well the first few times I've used it; however, now I have the #NUM! error that appears when inputting the formula for the chi-squared test statistic - as per printscreen below (you can see the formula I used in the formula bar). Baased on my research so far, it is because the p-value seems to be at zero (even if the p-value may actually be an ultra miniscule number that Excel cannot show). What can I do about this?

Many thanks,

Jenny

 

 

11 Replies

  • JoeUser2004's avatar
    JoeUser2004
    Bronze Contributor

    JennyLMace 

     

    It might be helpful and expedite a resolution if you attach the Excel file.  Use the "browse files to attach" link near the bottom of the "message" window.

    • JennyLMace's avatar
      JennyLMace
      Copper Contributor
      Thanks, Joe! But this doesn't seem to be an option available to me - neither in this reply nor if I 'edit' the original message... Many thanks 🙂
      • JoeUser2004's avatar
        JoeUser2004
        Bronze Contributor

        JennyLMace 

         

        I still think it would be prudent for you provide the Excel file, working around the "stoopid" forum limitation as I explained previously.

         

        But I might have an answer for you without it.  You might confirm it on your own.

         

        Previously, I wrote:  "format G20 as Scientific to see the [actual] p-value. 0.00E+00 is exactly zero. CHISQ.INV.RT [with 8 degrees of freedom] can work with p-values as low as 1E-60. But your p-value shouldn't be that low".

         

        Apparently, that last assertion is wrong.  But the key is indeed to format the p-value as Scientific, not Number, in order to see its actual value.

         

        Using the video that you cited (which is very good, BTW), I generated random data that actually has a strong dependency on having a college education.  My p-value is about 3E-110 (!).

         

        So the p-value certainly can be "that low".

         

        Nevertheless, CHISQ.INV.RT works in my case, probably because the degrees of freedom is 2, not 8.

         

        But my point is:  in your case, if there is a strong dependency among the data, perhaps the p-value is indeed so small that CHISQ.INV.RT will return #NUM.

         

        Off-hand, I cannot say whether that can or should not be the case.  Perhaps not mathematically.  But perhaps it is a numerical compuational limitation.

         

        Again, without the Excel file to look, I can only speculate.

         

Resources