Post Fisher's exact test- how to weight within categorial differences?

I am desperately looking for some statistical help with my data because I myself cannot transfer the theoretical stuff I lately read on residuals, chi square distributions, squared z-values ecetera to my problem. Therefore I would really appreciate somebody to help me on that:

I compared 2 distributions with 4 categories by using Fisher's exact test- the difference turned out to be significant.

Now I wanted to know which category is "responsible" for the difference. More specifically, I was interested in which of the 4 categories the observed values differed from the expected.

Therefore I calculated "standardized residuals" or "squared z-values" (if that is correct??), like this: (observed - expected) squared/ expected

category: 1; 2; 3;4

observed: 4; 7; 5; 56

expected: 1.4; 3.2; 4.6; 62.8

z-squared: 4.8; 4.5; 0.03; 0.73

Hence, from what I understand of this example the observed and expected values in category 3 and 4 are not "that" different, but well in category 1 and 2; But now what do the numbers exactly mean? Do they convey any information of contingency considering that the comparison deals with numbers of people in each category?

• If you understand what a z-score is, you'd probably find Pearson residuals more interpretable, even though they tell you about contribution to chi-square rather than to the Fisher test - they'd still give you some sense. However the results you present here make no sense to me. If you have two groups of numbers on 4 categories, there should be 8 observed and 8 expected. Apr 16 '13 at 8:20
• Sorry this is a misunderstanding: I did not present both distributions but one and in the second row the derived expected values under consideration of the other one. Now I want to know the exact (?) difference of my observed to the expected values. Is that more clear?
– Jojo
Apr 16 '13 at 8:28
• If that does help, the observed values of the second distribution were: 47; 109; 158; 2186
– Jojo
Apr 16 '13 at 8:40

Here are the (signed) square roots of the individual cell contributions to chi-square, essentially Pearson residuals for a Poisson model. They're not actually z-scores (they're on average a bit smaller - your $z^2$'s are probably actual squares of z scores).
> (a$observed-a$expected)/sqrt(a$expected) x1 x2 [1,] 2.1528248 -0.36534648 [2,] 2.0825076 -0.35341325 [3,] 0.2045836 -0.03471899 [4,] -0.8535520 0.14485258 We see - exactly as you suggested - the first two categories in the first variable seem to be what's "causing" significance. Those values are slightly "unusually" large, while none of the others are. • Ok, but then, is there no way I can attribute a more specific meaning to a Pearson resiudal of 2 cpmpared to for instance a residual of 53 (maybe that's a stupid question, but this is what I am looking for)? – Jojo Apr 16 '13 at 10:57 • The interpretation is very similar to interpreting a z-score, as I already mentioned. Apr 16 '13 at 11:24 • this is what i understand of z-values: it is a standardization, a space transformation under which each z-value has a specific probability. z has a mean of 0, z has a standard deviation of 1. – Jojo Apr 16 '13 at 12:19 • So you should be able to interpret your$z^2\$ values; if you take square roots and attach the signs of the Poisson-type Pearson residuals you should have something you can interpret even more directly. Apr 16 '13 at 12:24