mean_params = mean(ps, 0)
std_params = std(ps, 0)
return mean_params, std_params
data = noisy_data([0.5, 2.1])
mean_params, std_params = bootstrap(data)
print('95% confidence interval:')
print('mu: ', mean_params[0], ' +/- ', std_params[0] * 1.95996)
print('sigma: ', mean_params[1], ' +/- ', std_params[1] * 1.95996)
confidence interval with leastsq fit in scipy python