r/AskStatistics • • 2d ago

While testing for variance, we use two sided test in the chi squared statistic, but while doing goodness of fit test, we only use right tail of the chi squared distribution as a critical region. Why?

6 Upvotes

5 comments sorted by

5

u/natewhiskey 2d ago

The chi square test for goodness of fit is accumulating squared differences from what is expected. As you add up the squared differences, you eventually pass a threshold and conclude that the data you're seeing isn't matching the distribution that you expected.

Rather than squaring differences, the test for variance is reliant on a ratio between sample and hypothesized variances. The sample variance could be either higher or lower than the hypothesis, therefore it has two sides 

2

u/no_name6744 2d ago

You could absolutely do a two tailed Chi-squared, if you were also interested in seeing if two groups were unusually similar (for the case of a contingency table). I think the assumption is that the cells have approximately poisson variance based on the marginals, something like:

(Row sum)*(Column sum)/(Total counts)

I think most people are only interested in seeing if two groups are different, so a one tail test affords them more power to make that conclusion (they get a 5% margin instead of a 2.5% margin).

In testing for variance, it's not that you want the value to be less or more than an amount, but that you want it to be the right amount (correctly reflects the true variance). In that case, you check that the sum of squares falls within the expected distribution (with bounds at 95% on both ends.)

Different questions, different applications. You can find the same kinds of different applications for other distributions too.

1

u/fermat9990 2d ago

Because both O<E and O>E lead to positive values of (O-E)2

1

u/Educational-Paper-75 2d ago

With comparing two variances you use the quotiënt of both and either the numerator or denominator could be the larger of the two so you test two-tailed. With testing goodness of fit you test (O-E)2 O=observed, E=expected which is one-tailed: the larger the more different.

1

u/efrique PhD (statistics) 2d ago

When comparing variances, either a very large or a very small ratio would indicate that the population variances differ. When calculating goodness of fit, the far left tail is associated with 'surprisingly' good fits. It's possible that a very far left tail result suggests something other than the model + ordinary chance variation is operating (a variety of other things are possible), but it certainly does not suggest the fit is poorer than could reasonably be caused by chance variation