1
$\begingroup$

P$\bigg(20 < \bar{x} < 35 | \bar{x} \sim N(32, \frac{25^2}{30})\bigg)$

I know the answer is $18.7\%$ (according to my notes) I am not sure how to get to this value.

Also, how will the method change if I had

P$\bigg(\bar{x} <20 \bigcup \bar{x} > 35 | \bar{x} \sim N(30, \frac{25^2}{30})\bigg)$

For this, the answer is $15\%$.

3 Answers 3

0

Comment: I am concerned that in the discussion of incorrect probabilities, the main purpose of this Question may not have received proper attention. The title mentions Type I and Type II error, and it seems that a correct version of the question might have illustrated those concepts.

Accordingly, here is an elementary discussion of errors of Types I and II for a two-sided z test on the population mean, when the population SD $\sigma$ is known.

Let $X_1, X_2, \dots, X_{25}$ be a random sample from $\mathsf{Norm}(\mu,\sigma=25),$ where $\mu$ is unknown. Then $\bar X \sim \mathsf{Norm}(\mu, \sigma = 5).$

Suppose we wish to test $H_0: \mu = 100$ vs. $H_a: \mu \ne 100,$ based on the observed value of $\bar X.$ The test statistic is $Z = (\bar X - 100)/5$ and $H_0$ is rejected at the 5% level of significance if $|Z| > 1.96,$ which is the same as rejecting when $\bar X$ is outside the interval $(90.2, 109.8).$

Type I error is

$$\alpha =P(\text{Rej } H_0|\mu=100) = 1-P(90.2 < \bar X < 109.8|\mu=100).$$ Because of our choice of the rejection region, this should be 0.05 = 5%, which we verify using R statistical software below:

1 - diff(pnorm(c(90.2, 109.8), 100, 5))
## 0.04999579

Roughly speaking, Type II error is $\beta = P(\text{Acc } H_0|H_a),$ but there many alternative values $\mu_a$ of the population mean. So more carefully, we must think of a function $\beta(\mu_a).$

The Type II error for the specific alternative $\mu_a = 110$ is $$\beta(110) = P(90.2 < \bar X < 109.8|\mu=110) = 0.484,$$ as shown below:

diff(pnorm(c(90.2, 109.8), 110, 5))
## 0.4840091

The Type II error for other alternative values $\mu_a$ can be found similarly.

The power of a test is the probability of properly rejecting $H_0:$ that is $\pi(\mu_a) = 1 - \beta(\mu_a).$ Thus power is also a function of $\mu_a.$

In experimental design one often looks at the power function for a given sample size $n$ and significance level $\alpha$ to see what discrepancies $|\mu_0 - \mu_a|$ might lead to rejection. Below is a power curve for the current test.

mu.a = seq(75, 125, by = .01)
pwr = pnorm(90.2, mu.a, 5) + (1 - pnorm(109.8, mu.a, 5))
plot(mu.a, pwr, type="l", lwd=2)
abline(h=1, col="green2")
points(100, .05, pch=19, col="red")

We see that alternative values of the true population means that are about 15 to 20 units away from $\mu_0 = 100$ are reasonably sure to lead to rejection of $H_0.$ [The point at $(100, .05)$ is shown in red here because it is the only point on the curve that is not actually a 'power' value.]

enter image description here

Note: When the population SD $\sigma$ is unknown and estimated by the sample SD $S,$ one would use a t test. Computation of power for a t test is more intricate, involving the non-central t distribution.

2

Something seems to be wrong here. The probabilities you quote could not have come from the normal distribution $\mathsf{Norm}(\mu = 32,\; \sigma = 25/\sqrt{30})$ you give.

Here is a sketch of the density function of that normal distribution. The total area beneath the density curve is 100% = 1. The area you specify is beneath the curve and between the two vertical red lines. That area corresponds to a probability much larger than 0.187 = 18.7%.

enter image description here

Please take a look at your notes and edit your Question or leave a Comment if you can find the difficulty. Or, if you can describe the whole situation from the start, maybe I can help you see where the difficulty lies.

[Your distribution for $\bar X$ would result from averaging $n = 30$ observations randomly sampled from the distribution $\mathsf{Norm}(\mu = 32, \sigma=25),$ which seems an unlikely distribution to encounter in a practical problem.]

Implementing the CDF method of @Jan's Answer in R statistical software, I get for the area between the red lines in the sketch above to be about 74%, which seems about just looking at the sketch. Here is the computation:

diff(pnorm(c(20, 35), 32, 25/sqrt(30)))
## 0.7402144
  • 0
    That's what I was getting but my notes said the other value which threw me off, thank you!2017-02-15
  • 0
    I can't accept both answers unfortunately, but anyone else referring to this question (both answers are right and were helpful)2017-02-15
  • 0
    @user7416. Concerned that the true purpose of this exercise may have been lost in the discussion about the incorrect probability, I have included a brief discussion of Type I and II error probabilities, as Comment in "Answer" format, because of its length.2017-02-15
1

I am getting different number for your first expression. But this does not matter. (Also, note that your notation $\mathbb{P}[\bar{x}<20|\bar{x}\sim\mathcal{N}(\mu,\sigma)]$ is somewhat nonstandard since it is used for 'conditional on' but you are conditioning on $\bar{x}$ having some distribution, which is not an event. What I think you mean is $\mathbb{P}[\bar{x}<20]$ knowing that $\bar{x}\sim\mathcal{N}(\mu,\sigma)$.)

In the first expression you are calculating $\Phi_{\mu,\sigma}(35)-\Phi_{\mu,\sigma}(20)$, where $\Phi_{\mu,\sigma}$ is cdf of normal distribution with mean $\mu$ and standard deviation $\sigma$ (so that in your case $\mu=32$ and $\sigma=\frac{25}{\sqrt{30}}$). You can use Excel or online calculator to calculate the number.

Alternatively, you can note a well known fact that if $X\sim\mathcal{N}(\mu,\sigma)$, then $\frac{X-\mu}{\sigma}\sim\mathcal{N}(0,1)$. In other words, you know $\bar{x}\sim\mathcal{N}(32,\frac{25}{\sqrt{30}})$ and $$\mathbb{P}[20<\bar{x}<35]=\mathbb{P}\left[\frac{20-32}{\frac{25}{\sqrt{30}}}<\frac{\bar{x}-32}{\frac{25}{\sqrt{30}}}<\frac{35-32}{\frac{25}{\sqrt{30}}}\right]$$ where $\frac{\bar{x}-32}{\frac{25}{\sqrt{30}}}\sim\mathcal{N}(0,1)$. In this case you do not need to calculate cdf of $\mathcal{N}(\mu,\sigma)$ but of $\mathcal{N}(0,1)$.

For the second quantity, you are looking for $\Phi_{\mu,\sigma}(20)=\mathbb{P}[\bar{x}<20]$ and $1-\Phi_{\mu,\sigma}(35)=\mathbb{P}[\bar{x}>35]$.