Forum Discussion
JennyLMace
Mar 31, 2024Copper Contributor
#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 ha...
JoeUser2004
Mar 31, 2024Bronze Contributor
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.
- JennyLMaceMar 31, 2024Copper ContributorThanks, 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 🙂
- JoeUser2004Mar 31, 2024Bronze Contributor
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.
- JennyLMaceMar 31, 2024Copper ContributorThanks so much for your enthusiasm to help, Joe! Here is a copy of the content on a file: https://www.dropbox.com/scl/fi/6g7d2fhu2lw8aiznyhfef/Copy-of-NUM-problem.xlsx?rlkey=31le8cnmar61hav2v9l9u4n0l&dl=0
Let me know if you have any trouble accessing this; I've shared on Dropbox before, so I'm hoping you'll access it smoothly. In any case, I can indeed confirm that the p-value equates to zero when switching to the scientific format!
I look forward to receiving your insights. I'm only on the second of numerous of these tests, so if I'm experiencing this problem now, I fear it'll only be likely to happen again. Maybe on SPSS, I wouldn't have this issue?
Many thanks indeed (I'll pick up any replies tomorrow now),
Jenny
- JoeUser2004Mar 31, 2024Bronze Contributor
JennyLMace wrote: "this doesn't seem to be an option available to me"
Obviously, the problem is the p-value. We cannot help with that without access to all of the data and formulas in the Excel file.
(BTW, format G20 as Scientific to see the true p-value. 0.00E+00 is exactly zero. CHISQ.INV.RT can work with p-values as low as 1E-60. But your p-value shouldn't be that low, anyway.)
Upload the Excel file to a file-sharing website such as box.net/files, dropbox.com, onedrive.live.com, etc. (Not Google Sheets.) Then post a view-only download link that does not require that we login to download.
If this forum is "stoopid" enough to disallow file attachments for new users, it might not allow you to post the download link. (Sigh.)
To work-around that, copy and edit the link, removing the first few periods. For example, the "link" for this message is techcommunity microsoft com /t5/forums/replypage/board-id/ExcelGeneral/message-id/225406.