How can I calculate what observation characterizes the relationship of two variables? I have two variables.


*

*The prevalences of infection with Schistosoma (positive, negative)

*Different occupations in a rural area in central Africa (Fishermen, Farmers, Traders, Craftsmen)


I found that there is an association between risk of infection and occupation with a chi-squared test. My question is:  Which occupation mainly contributes to the association? How can I find it?
The table with data is:
           Fishermen    Farmers  Traders  Craftsmen
positive          21         20       17         16
negative          15         23       43         15

 A: If you do the calculation by hand, you will be able to identify which cells have the largest values of the chi-square stat (obs - exp)^2 / exp.
In your example, traders will show up as the largest deviation indicating the possible existence of an association when compared to other professions.
A: To produce the output below in SPSS, I arranged the data in two columns (long form), and coded occupations as 1=fishermen, 2=farmers, 3=traders, 4=craftsmen. The variable name is IVOcc (short for "Independent variable, occupation").
Thank you Arun Jose for interpreting it.  He wrote: “Any time you use a categorical variable with "n" levels, you only require "n-1" dummy variables as they are compared to one used as a reference. In your example, occupation 4 is taken as a reference and the other three coefficients indicate if the occurrence of infection is higher or lower when compared to craftsmen. Traders with -.993 at a p-value of .031 is the only variable that shows an association in this case. The other two occupations are not significant as they have high p-values.”

Have a look at the answers provided to this question, which poses a similar problem: stats.stackexchange.com/q/82454/95070 
A: It isn't necessarily the case that any particular cell "characterizes" the relationship.  That isn't what you're doing.  The chi-squared test for independence checks to see if the two variables as a whole are associated.  It is slightly improper to think of a single cell as unrelated / distinct from the other levels of a given categorical variable, or that that cell is where the association 'exists'.  However, it is perfectly reasonable to want to know which cells diverge the most from the counts you would expect under independence and thus contribute the most to the significance of the test.  I'm pretty sure that's what you're asking.  Bear in mind that if one cell is higher, (an)other cell(s) must be lower to compensate, so in some real sense the effect must exist in multiple cells.  
@ArunJose and @Scortchi are correct that Pearson residuals are typically used to examine this.  It may be helpful to visualize them, though.  A way to do that is to use a mosaic plot that colors the cells based on the residuals.  Here is an example using your data, coded in R:  
d = read.table(text="stuff      Fishermen    Farmers  Traders  Craftsmen
                     positive          21         20       17         16
                     negative          15         23       43         15", header=T)

tab = as.table(as.matrix(d[,2:5]))
rownames(tab) = d[,1]
names(dimnames(tab)) = c("Schistosoma", "Ocupation")
addmargins(tab)
#            Ocupation
# Schistosoma Fishermen Farmers Traders Craftsmen Sum
#    positive        21      20      17        16  74
#    negative        15      23      43        15  96
#    Sum             36      43      60        31 170
chisq.test(tab)
#   Pearson's Chi-squared test
# 
# data:  tab
# X-squared = 9.8257, df = 3, p-value = 0.02011
chisq.test(tab)$residuals
#            Ocupation
# Schistosoma  Fishermen    Farmers    Traders  Craftsmen
#    positive  1.3462838  0.2964026 -1.7840859  0.6821634
#    negative -1.1819983 -0.2602329  1.5663759 -0.5989198
windows()
  mosaicplot(t(tab[2:1,]), shade=TRUE)


What we see here is that, although you have a significant association, none of the cells strongly deviates from independence.  The discrepancy is fairly similar in absolute magnitude in all cells.  You can look at the residuals, calculated above, to get the actual numbers.  
The plot also shows that traders have the lowest proportion with Schistosoma, whereas fishermen have the highest.  
