Background

Computation of the concepts described in README depend on the properties of underlying random variables.

  • For samples with binary results, such as pass/fail or success/failure, we typically assume binomial distribution.

Binomial Distribution

If in \(n\) samples, we find \(f\) failures, then the confidence in reliability \(r, 0 \le r \le 1\) is

\[c = 1 - \sum_{k=0}^f \binom{n}{k} (1-r)^k r^{n-k},\]

where \(\binom{n}{k} = \frac{n!}{k!(n-k)!}\) is the binomial coefficient.

Calculating reliability means solving the above equation for \(r\). Yes, it is complicated. That is why we have relistats.binomial.reliability() method that uses numerical optimization! There are closed-form approximations and this library implements the ‘Wilson Score Interval with Continuity Correction’ method via relistats.binomial.reliability_closed().

Calculating assurance means setting \(r = c = a\) in the above equation to get

\[a = 1 - \sum_{k=0}^f \binom{n}{k} (1-a)^k a^{n-k}\]

Solving the above equation for \(a\) is not trivial. This library offers a numerical method relistats.binomial.assurance() that allows tuning desired accuracy level.

See paper Computation of Reliability Statistics for Success-Failure Experiments for more information.