set.seed(1432)
n_len <- 400000
jdc<- data.frame(rnd = numeric(n_len))
jdc$rnd <- runif(n_len,0,1)
ggplot(jdc,aes(x = rnd)) + geom_density()
As you will note the distribution of the random variable drops off towards both boundaries.
I am trying to sample based on some i less than rnd, but range of i is between 0, .05, thus this distribution is a problem.