Independence is equivalent to the following loglinear model:
That is, the fitted or expected value in the th cell is
calculated by multiplying a `grand mean' effect, an effect for
row , and an effect for column . Compare with the formula
we already used to calculate expected values under independence: