Bootstrapped Percentile Bootstrap

0.0.2 · abandoned · verified Fri Apr 17

The `bootstrapped` library provides implementations of percentile-based bootstrap methods for statistical analysis, primarily focusing on confidence intervals. It is currently at version 0.0.2, with its last release in September 2017, indicating a stalled or abandoned release cadence.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to generate sample data and then compute a 95% confidence interval for the mean using the `bootstrap` function from `bootstrapped.bootstrap` and the `mean` statistic function from `bootstrapped.stats_functions`.

import numpy as np
import bootstrapped.bootstrap as bs
import bootstrapped.stats_functions as sf

# Generate some data
data = np.random.normal(loc=100, scale=10, size=100)

# Calculate 95% confidence interval for the mean
lower_bound, upper_bound = bs.bootstrap(data, stat_func=sf.mean, alpha=0.05, num_iterations=1000)

print(f"Mean 95% CI: [{lower_bound:.2f}, {upper_bound:.2f}]")

view raw JSON →