scipy.stats._result_classes.BinomTestResult.
proportion_ci#
- BinomTestResult.proportion_ci(confidence_level=0.95, method='exact')[Quelle]#
Berechnet das Konfidenzintervall für
statistic.- Parameter:
- confidence_levelfloat, optional
Konfidenzniveau für das berechnete Konfidenzintervall des geschätzten Anteils. Standard ist 0.95.
- method{‘exact’, ‘wilson’, ‘wilsoncc’}, optional
Wählt die Methode zur Berechnung des Konfidenzintervalls für die Schätzung des Anteils aus
- ‘exact’
Verwendet die exakte Clopper-Pearson-Methode [1].
- ‘wilson’
- ‘wilsoncc’
Standard ist
'exact'.
- Rückgabe:
- ci
ConfidenceIntervalobject Das Objekt hat die Attribute
lowundhigh, die die untere und obere Grenze des Konfidenzintervalls enthalten.
- ci
Referenzen
[1]C. J. Clopper und E. S. Pearson, The use of confidence or fiducial limits illustrated in the case of the binomial, Biometrika, Vol. 26, No. 4, S. 404-413 (Dez. 1934).
Beispiele
>>> 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)