How can one calculate the corresponding p-value for Chi-squared with Yates' continuity correction using Excel? Without the correction, it is simple to use the CHISQ.TEST
function. There is nothing on correction in the Microsoft documentation. Minimal working example to follow.
My contingency table (B2:C3) would look like this:
No | Yes | |
---|---|---|
Men | 1659 | 92 |
Women | 323948 | 11090 |
And my expected frequencies (B5:C6) are:
No | Yes | |
---|---|---|
Men | 1693 | 58 |
Women | 323914 | 11124 |
In order to calculate the p-value we can use
CHISQ.TEST(B2:C3, B5:C6)
How to apply correction in Excel?
I have found a way to achieve that.
Step 1. Calculate the Chi-square with Yates' correction using the following formula: =(ABS(B2-B5)-0.5)^2/B5
and the same for the other three fields.
No | Yes | |
---|---|---|
Men | 0.66 | 19.15 |
Women | 0.00 | 0.10 |
Chi-squared value is the sum of all four values.
Step 2. The p-value can be calculated using:
=CHISQ.DIST.RT(<Chi-squared value>,<degrees of freedom>)
.