# Is it OK to do additive smoothing before applying Pearson's chi-square test for independence?

I'm concerned about treating my data as gold, especially in areas of low data support, so I would like to apply additive smoothing. I'm then doing several things with this data, and one of them is Pearson's chi-square test for independence. Is it still acceptable to first do the smoothing and then do the chi-square test? The former is very Bayesian and the latter is very frequentest, so at the least it feels somewhat strange. However, it seems like smoothing should curtail the need to worry much about the data support or the need for something like Fisher's exact test.

My reasoning for wanting to use competing philosophies is because the audience really wants to see p-values, but the Bayesian inside of me is fighting to be let loose. As such I came up with this compromise.

EDIT: To clarify how I envision the smoothing taking place, consider the following contingency table:

    X=0  X=1
+-------+
Y=0|  2|  2|
+---+---+
Y=1|  3|  3|
+---+---+


So without smoothing we have:

$P(X=0)=\frac{5}{10}$, $P(X=1)=\frac{5}{10}$, $P(Y=0)=\frac{4}{10}$, $P(Y=1)=\frac{6}{10}$

With additive smoothing and say $\alpha=1$ we get

$P(X=0)=\frac{6}{12}$, $P(X=1)=\frac{6}{12}$, $P(Y=0)=\frac{5}{12}$, $P(Y=1)=\frac{7}{12}$

I haven't yet decided how to handle the contingency table. One way would be to smooth each cell:

    X=0  X=1
+-------+
Y=0|  3|  3|
+---+---+
Y=1|  4|  4|
+---+---+

-
How does one even apply the $\chi^2$ test to smoothed data? Regardless, the smoothing is going to change the sampling distribution and introduce dependencies, thereby ruining the $\chi^2$ test. –  whuber Apr 6 '11 at 16:07
Thank you for the clarification. I still don't follow, because according to the edit you appear to be smoothing both the estimators of the marginal distributions and you seem to be changing the data! The former is ok, subject to some conditions (although it does nothing to change the "data support"), but--again--if you smooth the data, it's hard even to know what is being tested here. –  whuber Apr 6 '11 at 20:56
This seems vaguely like a test of independence for BB($\alpha,\alpha,N_i$)-distributed variables, but I wouldn't stake much on it. You'd probably be better off using Fisher's exact test - I'm not sure what your worry is with support. –  sesqu Apr 7 '11 at 0:14
@sesqu I don't think Fisher's exact test scales up, so I would have to use one technique for "small" datasets and another for "large" datasets, which has a number of drawbacks for my purposes. As for data support, I'm concerned because there is a big difference between 25% and 0%, but not so much between 1 out of 4 and 0 out of 4. I'm not sure that smoothing will solve this issue, but I thought it was worth a try. –  Michael McGowan Apr 7 '11 at 0:22
This smoothing scheme really only does much when some counts are very low, in which case Fisher's test is fast. If you do have datasets with large and small counts, Yates's continuity corrected chi-square might be sufficient. –  sesqu Apr 7 '11 at 0:56
show 4 more comments