# Interpretation of post hoc chi square test results

I have a $2\times 3$ table cross-tabulation. I've done a post-hoc test using SPSS but I don't know how to interpret the results. This is the output:

Although the idea is there on the table in the OP, the best thing to do is to actually obtain the standardized residuals (as opposed to the residuals). This should be a straightforward choice in your software package. The formula for the standardized residuals is:

$$\text{Pearson's residuals}\,=\,\frac{{\color{red}{\text{O}}{\,\text{bserved}} - \color{blue}{\text E}\,\text{xpected}}}{ \sqrt{{\color{blue}{\text E}\,\text{xpected}}}}$$.

In this way you can establish a risk alpha of $0.05$, corresponding to a cutoff limit for statistical significance of $1.96$.

What you have in the output table right now is just the residuals: $\text{(observed - expected)}$.

Recapping:

Cell counts:

        Variable
Gender    1  2  3 Sum
Male    9 21 34  64
Female 27 26 17  70
Sum    36 47 51 134


Expected counts:

        Variable
Gender    1  2  3 Sum
Male   17 22 24  63
Female 19 25 27  71
Sum    36 47 51 134


Each cell in the OP contains the difference (without rounding).

Now compare to the standardized residuals:

        Variable
Gender      1    2    3
Male   -2.0 -0.3  2.0
Female  1.9  0.3 -1.9


They have the same sign as your initial values and have parallel relative magnitudes, but allow an immediate interpretation in the way that those with absolute value greater than $1.96$ can be considered statistically significant. In your case it seems as though column "1" and "3" may be responsible for a positive omnibus chi square test.

You can visually see this with a mosaic plot:

The standardized residuals are color-coded in blue for positive departure from expected values, and in red for negative deviation. In addition, the surface area covered by each cell is proportional to the cell count.

Code in R:

table <- matrix(c(1,21,34,35,26,17), nrow = 2, byrow = T)
dimnames(table) = list(Gender=c("Male","Female"), Variable=c("1","2","3"))
expect <- round(chisq.test(table)$expected) addmargins(expect) round(chisq.test(table)$residuals, 1)