The cat data

Before

  food affection
food 10 114
affection 28 48

After

  food affection
food 10 114
affection 28 0

The expected tables

Expected Table 1

  food affection
food 23.56 100.4
affection 14.44 61.56

Expected Table 2

  food affection
food 31 93
affection 7 21

The contributions to the chi-squared statistic

For Table 1

  food affection
food 7.804 1.831
affection 12.73 2.987

For Table 2

  food affection
food 14.23 4.742
affection 63 21

A kind of silly graph