I have the following contingency table that results in statistically significant result of Pearson's $\chi^2$ Test for Count Data.
I've computed Pearson residuals that should have the same properties as the z-score (elaborated in the answer Correlation among categories between categorical nominal variables). However, I've noticed several issues:
- The mean value of Pearson residuals is 0.0388, not 0
- The standard deviation is 1.216, not 1
- None of the Pearson residuals exceed 1.96. It looks like no residual deviates enough from the expected value to be a cause of a statistically significant $\chi^2$ test.
I have the following questions:
- If the mean and sd of residuals from the table do not have properties of a standardised variable, how can we justify the use of $z$ distribution?
- Is it possible to say what causes the statistically significant $\chi^2$ test from the current analysis?
This example can be reproduced in R:
data <- matrix(c(15, 25, 15, 60, 15, 20), nrow=3, byrow=TRUE)
test <- chisq.test(data)
mean(test$residuals) # Pearson residuals mean = 0.03877184
sd(test$residuals) # Pearson residuals sd = 1.215643
Thank you for your feedback in advance.
