class_docstr: Result of `scipy.stats.binomtest`.
  
  Attributes
  ----------
  k : int
      The number of successes (copied from `binomtest` input).
  n : int
      The number of trials (copied from `binomtest` input).
  alternative : str
      Indicates the alternative hypothesis specified in the input
      to `binomtest`.  It will be one of ``'two-sided'``, ``'greater'``,
      or ``'less'``.
  pvalue : float
      The p-value of the hypothesis test.
  proportion_estimate : float
      The estimate of the proportion of successes.
docstr: Compute the confidence interval for the estimated proportion.
  
  Parameters
  ----------
  confidence_level : float, optional
      Confidence level for the computed confidence interval
      of the estimated proportion. Default is 0.95.
  method : {'exact', 'wilson', 'wilsoncc'}, optional
      Selects the method used to compute the confidence interval
      for the estimate of the proportion:
  
      'exact' :
          Use the Clopper-Pearson exact method [1]_.
      'wilson' :
          Wilson's method, without continuity correction ([2]_, [3]_).
      'wilsoncc' :
          Wilson's method, with continuity correction ([2]_, [3]_).
  
      Default is ``'exact'``.
  
  Returns
  -------
  ci : ``ConfidenceInterval`` object
      The object has attributes ``low`` and ``high`` that hold the
      lower and upper bounds of the confidence interval.
  
  References
  ----------
  .. [1] C. J. Clopper and E. S. Pearson, The use of confidence or
         fiducial limits illustrated in the case of the binomial,
         Biometrika, Vol. 26, No. 4, pp 404-413 (Dec. 1934).
  .. [2] E. B. Wilson, Probable inference, the law of succession, and
         statistical inference, J. Amer. Stat. Assoc., 22, pp 209-212
         (1927).
  .. [3] Robert G. Newcombe, Two-sided confidence intervals for the
         single proportion: comparison of seven methods, Statistics
         in Medicine, 17, pp 857-872 (1998).
  
  Examples
  --------
  >>> from scipy.stats import binomtest
  >>> result = binomtest(k=7, n=50, p=0.1)
  >>> result.proportion_estimate
  0.14
  >>> result.proportion_ci()
  ConfidenceInterval(low=0.05819170033997342, high=0.26739600249700846)
docstr_tok: ["Compute","the","confidence","interval","for","the","estimated","proportion",".","Parameters","--","--","--","--","--","confidence_level",":","float",",","optional","Confidence","level","for","the","computed","confidence","interval","of","the","estimated","proportion",".","Default","is","0.95.","method",":","{","'exact","'",",","'wilson","'",",","'wilsoncc","'","}",",","optional","Selects","the","method","used","to","compute","the","confidence","interval","for","the","estimate","of","the","proportion",":","'exact","'",":","Use","the","Clopper-Pearson","exact","method","[","1","]","_",".","'wilson","'",":","Wilson","'s","method",",","without","continuity","correction","(","[","2","]","_",",","[","3","]","_",")",".","'wilsoncc","'",":","Wilson","'s","method",",","with","continuity","correction","(","[","2","]","_",",","[","3","]","_",")",".","Default","is","``","'exact","'","``",".","Returns","--","--","--","-","ci",":","``","ConfidenceInterval","``","object","The","object","has","attributes","``","low","``","and","``","high","``","that","hold","the","lower","and","upper","bounds","of","the","confidence","interval",".","References","--","--","--","--","--","..","[","1","]","C.","J.","Clopper","and","E.","S.","Pearson",",","The","use","of","confidence","or","fiducial","limits","illustrated","in","the","case","of","the","binomial",",","Biometrika",",","Vol",".","26",",","No",".","4",",","pp","404-413","(","Dec.","1934",")",".","..","[","2","]","E.","B.","Wilson",",","Probable","inference",",","the","law","of","succession",",","and","statistical","inference",",","J.","Amer",".","Stat",".","Assoc.",",","22",",","pp","209-212","(","1927",")",".","..","[","3","]","Robert","G.","Newcombe",",","Two-sided","confidence","intervals","for","the","single","proportion",":","comparison","of","seven","methods",",","Statistics","in","Medicine",",","17",",","pp","857-872","(","1998",")",".","Examples","--","--","--","--",">",">",">","from","scipy.stats","import","binomtest",">",">",">","result","=","binomtest","(","k=7",",","n=50",",","p=0.1",")",">",">",">","result.proportion_estimate","0.14",">",">",">","result.proportion_ci","(",")","ConfidenceInterval","(","low=0.05819170033997342",",","high=0.26739600249700846",")"]
code: def proportion_ci(self, confidence_level=0.95, method="exact"):
      """
      Compute the confidence interval for the estimated proportion.
  
      Parameters
      ----------
      confidence_level : float, optional
          Confidence level for the computed confidence interval
          of the estimated proportion. Default is 0.95.
      method : {'exact', 'wilson', 'wilsoncc'}, optional
          Selects the method used to compute the confidence interval
          for the estimate of the proportion:
  
          'exact' :
              Use the Clopper-Pearson exact method [1]_.
          'wilson' :
              Wilson's method, without continuity correction ([2]_, [3]_).
          'wilsoncc' :
              Wilson's method, with continuity correction ([2]_, [3]_).
  
          Default is ``'exact'``.
  
      Returns
      -------
      ci : ``ConfidenceInterval`` object
          The object has attributes ``low`` and ``high`` that hold the
          lower and upper bounds of the confidence interval.
  
      References
      ----------
      .. [1] C. J. Clopper and E. S. Pearson, The use of confidence or
             fiducial limits illustrated in the case of the binomial,
             Biometrika, Vol. 26, No. 4, pp 404-413 (Dec. 1934).
      .. [2] E. B. Wilson, Probable inference, the law of succession, and
             statistical inference, J. Amer. Stat. Assoc., 22, pp 209-212
             (1927).
      .. [3] Robert G. Newcombe, Two-sided confidence intervals for the
             single proportion: comparison of seven methods, Statistics
             in Medicine, 17, pp 857-872 (1998).
  
      Examples
      --------
      >>> from scipy.stats import binomtest
      >>> result = binomtest(k=7, n=50, p=0.1)
      >>> result.proportion_estimate
      0.14
      >>> result.proportion_ci()
      ConfidenceInterval(low=0.05819170033997342, high=0.26739600249700846)
      """
      if method not in ("exact", "wilson", "wilsoncc"):
          raise ValueError(
              "method must be one of 'exact', 'wilson' or "
              "'wilsoncc'."
          )
      if not (0 <= confidence_level <= 1):
          raise ValueError(
              "confidence_level must be in the interval " "[0, 1]."
          )
      if method == "exact":
          low, high = _binom_exact_conf_int(
              self.k, self.n, confidence_level, self.alternative
          )
      else:
          # method is 'wilson' or 'wilsoncc'
          low, high = _binom_wilson_conf_int(
              self.k,
              self.n,
              confidence_level,
              self.alternative,
              correction=method == "wilsoncc",
          )
      return ConfidenceInterval(low=low, high=high)
  
file_path: catboost/contrib/python/scipy/py3/scipy/stats/_binomtest.py
imports: from math import sqrt
  import numpy
  from scipy._lib._util import _validate_int
  from scipy.optimize import brentq
  from scipy.special import ndtri
  from ._discrete_distns import binom
  from ._common import ConfidenceInterval
label_desc: Use image node_id 3 for calling the BinomTestResult obj's underlying member method code with example usage: obj.proportion_ci(confidence_level, method) and returns: ConfidenceInterval