Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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.

disp normal((20-19)/(3/sqrt(100)))-normal((19.5-19)/(3/sqrt(100)))

Your prediction about the probability tending to $0$ is correct.

share|improve this answer
    
Perfect. Thank you very much, I was able to produce all of the necessary values in Stata. –  clarence_atwater Jan 23 '13 at 22:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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