Skip to main content

expected_length

Function expected_length 

Source
pub fn expected_length(
    method: BinomialInterval,
    n: u64,
    p: f64,
    confidence: f64,
) -> f64
Expand description

The expected length $\sum_{k} (U(k) - L(k)) P_{p}(X = k)$ of an interval for $X \sim \mathrm{Bin}(n, p)$ (Brown et al. 2001, Sec. 3.3), with the ends of ErrorRate::interval.