statsmodels.stats.proportion.Proportions2indepTestResult#

class statsmodels.stats.proportion.Proportions2indepTestResult(statistic, pvalue, compare, method, diff, ratio, odds_ratio, variance, alternative, value, prop1_null=None, prop2_null=None)[source]#

Result of test_proportions_2indep.

Parameters:
statisticfloat

Test statistic, asymptotically normal distributed N(0, 1).

pvaluefloat

p-value based on the normal distribution.

compare{“diff”, “ratio”, “odds-ratio”}

Which comparison of the two proportions the test is for.

methodstr

Method used to compute the test.

difffloat

Observed difference, prop1 - prop2.

ratiofloat

Observed risk ratio, prop1 / prop2.

odds_ratiofloat

Observed odds ratio.

variancefloat

Estimated variance of the test statistic under the null hypothesis.

alternativestr

The alternative hypothesis used for the test.

valuefloat

Value of the difference, risk ratio or odds ratio under the null hypothesis.

prop1_nullfloat or None

Constrained estimate of the first proportion under the null hypothesis. Only set if method="score", otherwise None.

prop2_nullfloat or None

Constrained estimate of the second proportion under the null hypothesis. Only set if method="score", otherwise None.

Attributes:
alternative
compare
diff
method
odds_ratio
prop1_null
prop2_null
pvalue
ratio
statistic
value
variance

Notes

Unpacks as statistic, pvalue = result. Other values are only accessible using attributes.

Methods

Properties