scipy.stats._result_classes.BinomTestResult.
proportion_ci#
- BinomTestResult.proportion_ci(confidence_level=0.95, method='exact')[source]#
計算
statistic
的信賴區間。- 參數:
- 回傳值:
- ci
ConfidenceInterval
物件 此物件具有屬性
low
和high
,用於保存信賴區間的下限和上限。
- ci
參考文獻
[1]C. J. Clopper 和 E. S. Pearson,《The use of confidence or fiducial limits illustrated in the case of the binomial》,Biometrika,第 26 卷,第 4 期,第 404-413 頁 (1934 年 12 月)。
範例
>>> from scipy.stats import binomtest >>> result = binomtest(k=7, n=50, p=0.1) >>> result.statistic 0.14 >>> result.proportion_ci() ConfidenceInterval(low=0.05819170033997342, high=0.26739600249700846)