'Test that all tables have odds ratio equal to 1.
This is the \'Mantel-Haenszel\' test.
Parameters
correction : boolean
If True, use the continuity correction when calculating the
test statistic.
Returns
A bunch containing the chi^2 test statistic and p-value.'

def test_null_odds(self, correction=False):

    statistic = np.sum((self.table[0, 0, :] - ((self._apb * self._apc) / self._n)))
    statistic = np.abs(statistic)
    if correction:
        statistic -= 0.5
    statistic = (statistic ** 2)
    denom = (((self._apb * self._apc) * self._bpd) * self._cpd)
    denom /= ((self._n ** 2) * (self._n - 1))
    denom = np.sum(denom)
    statistic /= denom
    pvalue = (1 - stats.chi2.cdf(statistic, 1))
    b = _Bunch()
    b.statistic = statistic
    b.pvalue = pvalue
    return b
