relistats package

Submodules

The submodules are as follows.

relistats.binomial module

Reliability Engineering Statistics for Binomial Distributions

Also known as Bernoulli Trials.

Reference: S.M. Joshi, “Computation of Reliability Statistics for Success-Failure Experiments,” arXiv:2303.03167 [stat.ME], March 2023. https://doi.org/10.48550/arXiv.2303.03167

relistats.binomial.assurance(n: int, f: int, tol=0.001) float | None

Assurance [0, 1], i.e., confidence = reliability. For example, 90% assurance means 90% confidence in 90% reliability (at n=22, f=0). This method uses numerical approach of Brent’s method to compute the solution within the specified tolerance.

Parameters:
  • n (int, >=0) – number of samples

  • f (int, >=0) – number of failures

  • tol (float, optional) – accuracy tolerance

Returns:

Assurance or None if it could not be computed

Return type:

float, optional

relistats.binomial.confidence(n: int, f: int, r: float) float | None

Confidence [0, 1] in reliability r using closed-form expression.

Parameters:
  • n (int, >=0) – number of samples

  • f (int, >=0) – number of failures

  • r (float, [0, 1]) – reliability level

Returns:

Confidence or None if it could not be computed

Return type:

float, optional

relistats.binomial.reliability(n: int, f: int, c: float) float | None

Minimum reliability at confidence level c

Parameters:
  • n (int, >=0) – number of samples

  • f (int, >=0) – number of failures

  • c (float, [0, 1]) – confidence level

Returns:

Reliability or None if it could not be computed

Return type:

float, optional

relistats.binomial.reliability_closed(n: int, f: int, c: float) float | None

Approximate minimum reliability [0, 1] at confidence level c. The approximation is within about 5% of actual reliability and uses closed-form expression for computation called ‘Wilson Score Interval with Continuity Correction’ [Wallis, Sean A. (2013). “Binomial confidence intervals and contingency tests: mathematical fundamentals and the evaluation of alternative methods”. Journal of Quantitative Linguistics. 20 (3): 178–208].

Parameters:
  • n (int, >=0) – number of samples

  • f (int, >=0) – number of failures

  • c (float, [0, 1]) – confidence level

Returns:

Reliability or None if it could not be computed

Return type:

float, optional

relistats.binomial.reliability_optim(n: int, f: int, c: float, tol=0.001) float | None

Minimum reliability [0, 1] at confidence level c using numerical optimization (Brent’s method). The approximation is within specified tolerance limit.

Parameters:
  • n (int, >=0) – number of samples

  • f (int, >=0) – number of failures

  • c (float, [0, 1]) – confidence level

  • tol (float, optional) – accuracy tolerance

Returns:

Reliability or None if it could not be computed

Return type:

float, optional

Module contents

See submodules