figure empirical cdfs of the medians of the resampled data (left curveand sample means (right curveof the resampled data instead of sampling completely new datawe could also reuse the original data by ex eand resampling them via algorithm this gives independent copies for which we can again plot the empirical cdf the results will be similar to the previous case in factin figure the cdf of the resampled sample medians and sample means are plotted the corresponding python code is given below the essential point of this example is that resampling of data can greatly add to the understanding of the probabilistic properties of certain measurements on the dataeven if the underlying model is not known see exercise for further investigation of this example quotunif py import numpy as np from numpy random import rand choice import matplotlib pyplot as plt from statsmodels distributions empirical_distribution import ecdf rand( )/rand(ndata med np zeros (nave np zeros (nfor in range ( , ) choice (xnreplace =trueresampled data med[inp median (save[inp mean(smed_cdf ecdf(medave_cdf ecdf(aveplt plotmed_cdf xmed_cdf yplt plotave_cdf xave_cdf yplt show (