In a previous post I gave a simple exercise to illustrate the sampling distribution. I figured it would be of interest to some to show how this exercise could be completed in R, or the language which I now use more frequently, Julia.
A good friend of mine has been learning how to use R for his research in community ecology for the last year. He reminded me today of an exercise I wrote up for him awhile back to introduce the use of for loops. The exercise is a demonstration of the sampling distribution and goes as such: