I have a data sample (in this case an EEG data sample, but my question refers to any type of data samples of prior unknown distributions).

I would like to do a nonparametric estimate of the expected value for my sample. I did some research, from what I understood I can do this using bootstrap sampling. I found a pdf here giving a formula for bootstrap expected value, hopefully it's correct.

In case it's not, can someone please let me know how to do it once I have generated the samples by bootstrapping?

Another possibility seems to be MCMC, but I would need to know the distribution from what I understood. I could do a kernel density estimation probably, but I think using bootstrapping might be less complex?

I can use python, Matlab or R, in case you do this kind of thing often and have code at hand to share, I'd really appreciate it.

Any other methods/suggestions are more than welcome.


1 Answer 1


It is quite simple; you make a subsample by sampling with replacement:


calculate the statistic you want on it:


finally average it over many repetitions:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.