aaanalysis.comp_bootstrap_ci
- aaanalysis.comp_bootstrap_ci(values=None, n_rounds=1000, ci=0.95, seed=None)[source]
Compute a percentile bootstrap confidence interval of the mean.
Standard small-N uncertainty quantification over a per-protein metric vector (e.g. the output of
comp_per_protein_ap()). Resamples with replacement;NaNvalues are dropped first. Deterministic givenseed.Added in version 1.1.0.
- Parameters:
- Returns:
Dictionary with keys
'mean'(mean of the finitevalues),'ci_low'(lower bound of theciinterval), and'ci_high'(upper bound of theciinterval).- Return type:
See also
comp_per_protein_ap()for the per-protein metric vector this summarizes.
Examples
comp_bootstrap_cireports a seeded percentile bootstrap confidence interval over a per-protein metric vector (e.g. the output ofcomp_per_protein_ap) for small-N uncertainty. It returns a dict{'mean', 'ci_low', 'ci_high'}.import numpy as np import aaanalysis as aa ap = np.array([0.82, 0.91, 0.77, 0.88, 0.80]) ci = aa.comp_bootstrap_ci(values=ap, n_rounds=500, ci=0.95, seed=0) ci
{'mean': 0.836, 'ci_low': 0.792, 'ci_high': 0.88105}