6
$\begingroup$

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?

$\endgroup$
1
  • 2
    $\begingroup$ Sample with replacement giving the same probability to each point. $\endgroup$
    – Zen
    Commented Dec 17, 2018 at 10:31

1 Answer 1

6
$\begingroup$

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.

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.