# Basic Statistics Question (sample, normal distribution)

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.

-

Yes, $Z$ is a standardization of $\bar{X}_n$ (I put an index on your $\bar{X}$), i.e. $Z\sim\mathcal{N}(0,1)$, and so $$P(a\leq \bar{X}_n\leq b)=P\left(\frac{a-\mu}{\sigma/\sqrt{n}}\leq Z\leq \frac{b-\mu}{\sigma/\sqrt{n}}\right)=\Phi\left(\frac{b-\mu}{\sigma/\sqrt{n}}\right)-\Phi\left(\frac{a-\mu}{\sigma/\sqrt{n}}\right),$$ where $\Phi$ is the cumulative distribution function for an $\mathcal{N}(0,1)$ distribution. So you're looking to compute $$P(n):=P(19.5\leq \bar{X}_n\leq 20)=\Phi\left(\frac{20-19}{3/\sqrt{n}}\right)-\Phi\left(\frac{19.5-19}{3/\sqrt{n}}\right).$$
The Stata function normal() is exactly the $\Phi$ from above. The following expression in Stata yields the correct result for me.
Your prediction about the probability tending to $0$ is correct.