zepid.calc.utils.sensitivity(detected, cases, alpha=0.05, confint='wald')

Calculate the sensitivity from number of detected cases and the number of total true cases.

  • detected (integer, float) – Number of true cases detected via testing criteria
  • cases (integer, float) – Total number of true/actual cases
  • alpha (float, optional) – Alpha value to calculate two-sided Wald confidence intervals. Default is 95% confidence interval
  • confint (string, optional) – Type of confidence interval to generate. Current options include Wald or Hypergeometric confidence intervals

Tuple of sensitivity, lower CL, upper CL, SE

Return type:



Calculating sensitivity

>>> from zepid.calc import sensitivity
>>> se = sensitivity(90, 100)

Extract sensitivity

>>> se[0]

Extract confidence intervals for sensitivity

>>> se[1:3]

Extract standard error

>>> se[3]