# scipy.stats._result_classes.EmpiricalDistributionFunction.confidence_interval

EmpiricalDistributionFunction.confidence_interval(confidence_level=0.95, *, method='linear')

  Compute a confidence interval around the CDF/SF point estimate

  Parameters:
    confidence_level float, default: 0.95

      Confidence level for the computed confidence interval

    method str, {“linear”, “log-log”}

      Method used to compute the confidence interval. Options are “linear” for the conventional Greenwood confidence interval (default) and “log-log” for the “exponential Greenwood”, log-negative-log-transformed confidence interval.

  Returns:
    ci `ConfidenceInterval`

      An object with attributes `low` and `high`, instances of `EmpiricalDistributionFunction` that represent the lower and upper bounds (respectively) of the confidence interval.

  Notes

  Confidence intervals are computed according to the Greenwood formula (`method='linear'`) or the more recent “exponential Greenwood” formula (`method='log-log'`) as described in [1]. The conventional Greenwood formula can result in lower confidence limits less than 0 and upper confidence limits greater than 1; these are clipped to the unit interval. NaNs may be produced by either method; these are features of the formulas.

  References

  [1]

  Sawyer, Stanley. “The Greenwood and Exponential Greenwood Confidence Intervals in Survival Analysis.” https://www.math.wustl.edu/~sawyer/handouts/greenwood.pdf