bundles / scipy 1.17.1 / scipy / stats / _binomtest / BinomTestResult / proportion_ci
function
scipy.stats._binomtest:BinomTestResult.proportion_ci
source: /scipy/stats/_binomtest.py :50
Signature
def proportion_ci ( self , confidence_level = 0.95 , method = exact ) Summary
Compute the confidence interval for statistic.
Parameters
confidence_level: float, optionalConfidence level for the computed confidence interval of the estimated proportion. Default is 0.95.
method: {'exact', 'wilson', 'wilsoncc'}, optionalSelects the method used to compute the confidence interval for the estimate of the proportion:
'exact' :
Use the Clopper-Pearson exact method [1].
'wilson' :
'wilsoncc' :
Default is
'exact'.
Returns
ci: ``ConfidenceInterval`` objectThe object has attributes
lowandhighthat hold the lower and upper bounds of the confidence interval.
Examples
from scipy.stats import binomtest result = binomtest(k=7, n=50, p=0.1) result.statistic✓
result.proportion_ci()
✗Aliases
-
scipy.stats._binomtest.BinomTestResult.proportion_ci