Compute a confidence interval from sample data assuming unknown distribution
If you don’t know the underlying distribution, then my first thought would be to use bootstrapping: https://en.wikipedia.org/wiki/Bootstrapping_(statistics) In pseudo-code, assuming x is a numpy array containing your data: import numpy as np N = 10000 mean_estimates = [] for _ in range(N): re_sample_idx = np.random.randint(0, len(x), x.shape) mean_estimates.append(np.mean(x[re_sample_idx])) mean_estimates is now a list of 10000 … Read more