I need to find the 95% confidence interval as 2.5 and 97.5 quantiles
boot_mean_diff = []
for i in range(3000):
boot_before = before_proportion
boot_after = after_proportion
boot_mean_diff.append(boot_after.mean()-boot_before.mean())
# Calculating a 95% confidence interval from boot_mean_diff
boot_mean_diff=pd.Series(boot_mean_diff)
#boot_mean_diff1=boot.boot_mean_diff(frac=1,replace=True)
confidence_interval = pd.Series(boot_mean_diff).quantile([0.025,0.975])
confidence_interval
However, I am getting the error below ----
AssertionError: confidence_interval should be calculated as the [0.025, 0.975] quantiles of boot_mean_diff.
before_proportionandafter_proportion? - foxpalbefore_proportionandafter_proportion, and it works fine. Could you edit your code to provide a minimum working example, including those two Series? - foxpal