An application of the log-
likelihood ratio test for the hypothesis of independence in an
r x
c contingency table. It can also be used to test goodness-of-fit. The G-test should be preferred over Chi-squared test when for any cell in the table, | O-E | > E. The Chi-squared distribution is usually poor for the test statistics

when N/rc is smaller than five.