1
$\begingroup$

I had a homework assignment asking us to code some basic things in R. Here are the tasks:

  1. Generate a Gamma(1,2) population of size N=5000 and show its density plot and descriptive statistics.
  2. Create the sampling distribution of the sample mean from 200 samples, each of size n=35, drawn from the above population.
  3. Show a density plot and descriptive statistics for this sampling distribution

I have already done the coding. But for the last question it asks, "Are your results in agreement with the central limit theorem (CLT)? Did you expect that?"

What should I be looking for exactly? I guess I don't fully understand the central limit theorem so I'm not really sure how to connect it to my results.

$\endgroup$
1
$\begingroup$

Let $X_i$ be the result of sampling from your gamma distribution on the $i$'th trial. Let $Y_i:=(X_i-\mu_i)/\sigma_i$, where $\mu_i=E[X_i]=E[X_1]$ and $\sigma_i$ is the standard deviation of $X_i$, both of which you know from the parameters of the gamma distribution.The central limit theorem says that

$$\frac{Y_1+\cdots+Y_n}{\sqrt{n}}\Rightarrow N(0,1).$$

In other words, if you define:

$$Z_n=\frac{Y_1+\cdots+Y_n}{\sqrt{n}},$$

and then repeatedly sample $Z_n$ for some large $n$ (say, n=100), then the histogram (density plot) of $Z_n$'s should look roughly like a standard normal distribution. The larger $n$ is, the more accurate it should look.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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