uvex_transients.utils.stat_utils.clopper_pearson_interval#
- uvex_transients.utils.stat_utils.clopper_pearson_interval(k: int, n: int, confidence: float) tuple[float, float][source]#
Compute the exact (Clopper-Pearson) confidence interval on a binomial proportion.
The interval is central, with probability \((1-C)/2\) in each tail. Its limits are quantiles of Beta distributions, except at the boundaries where they are fixed: the lower limit is 0 for \(k=0\) and the upper limit is 1 for \(k=n\).