# Computing chi-square for large tables with some expected cell counts equal to zero

What should I do if the expected value in a Chi-square goodness-of-fit test is zero? I know there's Fisher's test but I have a very large table!

• can you please be more specific about what you are doing exactly? I think you are missing something here as @dsimcha mentions. – suncoolsu Feb 21 '11 at 6:23

## 2 Answers

If the expected value of a cell is zero in a goodness of fit test (I'm assuming you really mean goodness of fit, where the fit is to a theoretical distribution, not another observed distribution) then there are two possibilities:

1. You also observed this value zero times. Just discard the zero expected value and try again. Zero observations is the only value you should get with zero expected value.

2. You observed this value more than zero times. In this case your null hypothesis is obviously wrong, because this value has a nonzero probability.

If you are using Pearson's chi-square test as a test independence of two variables in a two-way contingency table, you'll get a zero expected value only if you have a whole row of zeroes or a whole column of zeroes. You can simply remove that row or column.