Now, we can clearly see that a random sample, when using the same sample density as our sample data, really does capture sample variation in our population. However, when we look at our sample it is clearly biased away from the upper tail of the population (vertical lines on plot show sample bounds in our data). So, we can say that this is drawn from the population, sharing distributional characteristics with the population but, exhibits a bias. One should note that our random sample is a good representation of the population and in our bootstrap, we applied a KS test comparing our sample against the random sample. We see that length(b[b<0.05]) / length(b)
we have 0.30% of our bootstraps that cannot reject the null. This is a significant result in proving that, aside from the bias, we have a good representation of the population distribution. If we look at the empirical cumulative distribution function we see that the sample and population distributions are very well matched, except for missing that upper tail. If we truncate the distribution they are almost exact.
par(mfrow=c(1,2))
plot(ecdf(x),)
pch=20 plot(ecdf(ss), col="red", add=TRUE)
plot(ecdf(x[-which(x > max(ss))]))
plot(ecdf(ss), col="red", add=TRUE)