Any test or metric that employs random sampling with replacement—such as to simulate the sampling process—is referred to as bootstrapping and belongs to the broader category of resampling procedures. By relying on random sampling with replacement, the bootstrap plot is used to assess the uncertainty of a statistic. In other words, it’s a technique for determining the uncertainty in fundamental statistics like mean and median by resampling the data with replacement.
bootstrap_plot() function will generate bootstrapping plots for mean, median, and mid-range statistics for the given number of samples of the given size.
pandas.plotting.bootstrap_plot(series, fig=None, size=50, samples=500, **kwds)
series: This is the series from which samples are drawn.
fig: Matplotlib’s figure can be specified here. Otherwise, a new one will be created.
size: This is the sample size to draw for each sampling process.
samples: This is the number of times the bootstrap procedure/sampling is performed.
import pandas as pd import seaborn as sns df = sns.load_dataset("geyser") pd.plotting.bootstrap_plot(df['waiting'],size = 50 , samples = 500).show()
load_dataset()function in seaborn to load the
"geyser"dataset into memory as a DataFrame.
waitingcolumn of the DataFrame with the sample size as
50and the number of samples as
View all Courses