The statistic that tests
in
tables compares the
sample counts with expected/ counts that are calculated under
the assumption that
is true. The expected count in the ijth
cell of the table is denoted by
. For an
table,
the expected counts/ are calculated from the marginal totals in
the samples count table using the formula