statsmodels.stats.proportion.binom_test_reject_interval#
- statsmodels.stats.proportion.binom_test_reject_interval(value, nobs, alpha=0.05, alternative='two-sided')[source]#
Rejection region for binomial test for one sample proportion
The interval includes the end points of the rejection region.
- Parameters:
- value
floator array_like proportion under the Null hypothesis, 0 <= value <= 1.
- nobs
intor array_like the number of trials or observations.
- alpha
floator array_like,optional Significance level of the test, default 0.05.
- alternative{‘two-sided’, ‘smaller’, ‘larger’},
optional alternative hypothesis, which can be two-sided or either one of the one-sided tests.
- value
- Returns:
- Raises:
ValueErrorIf
valueis not in [0, 1],alphais not in (0, 1), ornobsis not a positive integer. This includes NaN values.
See also
binom_testExact binomial test for one sample proportion.
binom_tost_reject_intervalRejection region of the exact equivalence test.
Notes
For the two-sided alternative, the null hypothesis is rejected if and only if
count <= x_loworcount >= x_upp. The region is equal-tailed, the probability of each tail is at mostalpha / 2under the null hypothesis. It differs in general from the rejection region of the two-sided test inbinom_test, which is based on the probabilities of the outcomes, as inscipy.stats.binomtest.For the one-sided alternatives, the null hypothesis is rejected if and only if
count <= x_lowfor'smaller'andcount >= x_uppfor'larger'. The other bound is not used, it isnobsfor'smaller'and0for'larger', broadcast to the shape of the result.Changed in version 0.15.1:
value,nobsandalphacan be array_like. Invalid arguments raise aValueError.