Can $\chi^2$ test be used to determine the direction of deviation? I'm coming across questions in Biostats which ask to test the hypothesis through  χ2 test that $-$

*

*A drug it better than a placebo.
Not that the effect of the drug is not the same as the placebo.


*Heterozygotes with sickle cell trait are more resistant to malaria than individuals homozygous for the normal gene. (Q-27 of this book)
Not that the proportion of the individual with sickled cell trait with heavy infection is not the same as the proportion of the normal individual with heavy infection.
What I understand of Chi-square:
The chi square is a measure (square) of deviation of an observed sample from a standard data/proportion/frequency, it does not indicate the direction of the deviation (i.e. it is not positive,negative and zero as z-score but is only positive and zero). If the data is a good fit with theoretical, the  χ2 would be less or in fact zero (something out of shear chance) and the value will increase with deviation.
So, should (is) χ2 test be used to determine the direction of deviation?
 A: Directionality in $2\times 2$ tables
Let us restrisct ourselves to $2\times2$ contingency tables first. I'm taking example from Wikipedia (distribution of white and blue collar workers in neighbourhoods $A$ and $B$). The observed values are as follows:

.
Now we calculate deviations from expected values called residuals in the following way:
$$n_{i,j}-\frac{n_{i,\bullet}\times n_{\bullet,j}}{n_{\bullet,\bullet}}$$
This is simply substracting expected value of a cell from a observed  value of a cell. Expected value for a cell $n_{W,A}=120\times 150/230$. We get the following table of residuals:

First thing you notice is that residuals sum to zero and that absolute observed values of residuals are all the same  (we only work with one $df$). You notice there is 11.74 more White collar workers in neighbourhood $A$ than expected.  So it follows there is 11.74 more Blue collar workers in neighbourhood $B$. Neighbourhood $A$ is more White collar and $B$ is more Blue collar. Directionality in $2\times 2$ tables is obvious.   If the value of $\chi^2$ test is statistically significant we can conclude that: $(1)$  neighbourhood of residence is not independent from occupational classification AND $(2)$ that neighbourhood $A$ is more White collar and $B$ is more Blue collar.

Directionality in large tables
$\chi^2$ test in cases where $df>1$ acts as an omnibus test. It tests whether data as a whole is independently distributed. To asses directionality in larger tables you have to use additional post-hoc tests to pinpoint contributing sources of dependence. For this you can use three methods:


*

*Comparing cells

*Partitioning

*Ransacking


You can find more information about these methods in Sharpe (2015) Your Chi-Square Test is Statistically Significant: Now What? Practical Assessment, Research & Evaluation.
