Avalaible statistics test

statisticsTest.chisquare_trend_contingency(observed, tendencies_values, axis=None)

Apply a Chi2 square Cochran-Armitage trend test with variable in a contingency table. It measure the effect of an tendencie variable on a evaluated variable. The evaluated variable should be a categorial variable with 2 modalities. It should be of shape 2. The tendencies values should be of shape >= 2 an be numeric.

  • Monotonous evolution of the tendencie (not checked by the function)

  • Theorical value >= 5 : checked by the function

observed, numpy matrix : contingency table of observed value. Should have an axis with a shape of 2 as the test is designed to evaluate tendencies on 2 modalities categorial variable. If only an axis is of shape 2, this axis is used for applying the test, otherwise you should specify the axis containing the tested variable with the axis parameter. tendencies_values, numpy vector : values of the tendencie variable, should be an 1D vector of shape >= 2

chi2float

The test statistic.

pfloat

The p-value of the test

dofint

Degrees of freedom

expectedndarray, same shape as observed

The expected frequencies, based on the marginal sums of the table.