I am working on a question for an econometrics class that involves using the program Stata. It is as follows
Suppose $X_i$, $i=1,2,...,n$ are i.i.d random variables, each distributed $N$($19,9$). Define $\bar{X}$ to be the mean value of the $n$ random variables. Find $Pr(19.5 \leq \bar{X} \leq 20)$ for $n=25$, $n=100$, $n=500$, and $n=1000$. What do you expect the value of $Pr(19.5 \leq \bar{X} \leq 20)$ would approach if $n$ were to approach infinity? How is this result related to the Law of Large Numbers?
We are to use the normal() function in Stata to compute the probability. I want to check to see if my approach is correct.
I believe that I use
$$Z= \frac{\bar{X} - \mu}{\sigma /\sqrt{n}} $$
to standardize, with $\mu = 19$ and $\sigma = \sqrt{9}=3$. So, for the question, with $n=25$, I would use
$$Pr(\frac{\bar{X} - \mu}{\sigma /\sqrt{n}} \leq \bar{X} \leq \frac{\bar{X} - \mu}{\sigma /\sqrt{n}})$$
$$Pr(\frac{19.5 - 19}{3 /\sqrt{25}} \leq \bar{X} \leq \frac{20 - 19}{3 /\sqrt{25}})$$
I would then repeat for the other values of $n$. Then I simply use the standardized values to find the probabilities with Stata's normal() function. This just involves putting a value in the brackets, for instance normal(1), which returns a value $.84134475$.
I would expect the value of $Pr(19.5 \leq \bar{X} \leq 20)$ to approach $0$ as $n$ approaches infinity, because the sample mean should approach the population mean of 19.