1

Let $Y_1,Y_2,\ldots,Y_n$ be independent and identically distributed normal random variables with mean 5, and variance 16. Let $n=10$, use R to find $prob(\overline{Y} \leq 4)$ where $\overline{Y}$ is the mean of $Y_1,Y_2,\ldots,Y_n$.

I know how to set up the distribution oh $\overline{Y}$ in R, but I'm completely blanking on how to extract that probability from knowing the distribution.

To set up the distribution in R, we write:

Y <- rnorm(100000, 5, 4) Y <- matrix(Y, byrow = T, ncol = 10) Y_Means <- apply(Y, 1, mean)

Now that we have the distribution (Y_Means), how to find probability?

1 Answers1

0

$\newcommand{\var}{\operatorname{var}}$ $\newcommand{\E}{\mathbb E}$

You're making this immensely more complicated than it is.

You've got $$ \E\left(\frac{Y_1+\cdots+Y_n}{n}\right) = 5 $$ and $$ \var\left(\frac{Y_1+\cdots+Y_n}{n}\right) = \frac{16}{n}. $$ Therefore $$ \frac{(Y_1+\cdots+Y_n)/n-5}{\sqrt{16/n\,{}}} \sim N(0,1). $$ So $$ \Pr\left(\frac{Y_1+\cdots+Y_n}{n}\le 4\right) = \Pr\left(\frac{(Y_1+\cdots+Y_n)/n-5}{\sqrt{16/n\,{}}} \le \frac{4-5}{\sqrt{16n\,{}}}\right) = \Pr\left(Z\le\frac{4-5}{\sqrt{16n\,{}}}\right) $$ where $Z\sim N(0,1)$.

So plug $\dfrac{4-5}{\sqrt{16n\,{}}}$ into the cumulative distribution function of the standard normal distribution. That cumulative distribution function is computed by a standard R command, pnorm if I recall correctly.