Solved – Sampling from empirical distribution

bootstrapempirical-cumulative-distr-fnrsampling

I have a vector of y (min is > 0, max could be 1), for which, i have no idea what distribution is. But based on the data we have, vector y, we can get the empirical cumulative probability distribution, i.e., ecdf(y).

My question is how to sample new data based on this empirical distribution?

Best Answer

Sampling from the empirical distribution function ecdf is the same as resampling (with replacement, equal probabilities) from the sample $y$. $\text{ecdf}(y)$ is just a recoding of the sample, the sample points in $y$ correspond to the jump points (discontinuity points) in the ecdf. This is just bootstrapping.