# From normal dist. with unknown variance, how to compute $P(\bar X>c)$?

We have $$X_i \sim ^{iid} N(\mu,\sigma^2)$$with known mean $$\mu$$, and unknown $$\sigma^2$$. Let's suppose we're given $$s^2$$ (sample variance) and $$n$$ (sample size).

We know $$\frac{\bar X-\mu}{S/\sqrt{n-1}} \sim t(n-1)$$.

• Is there a way to compute $$P(\bar X>c)$$?

Now, I've seen several times the following reasoning:

$$P(\bar X>c)=P\left(\frac{\bar X-\mu}{S/\sqrt{n-1}}>\frac{c-\mu}{s/\sqrt{n-1}}\right)$$

However, I find this odd, instead I think we should have

$$P(\bar X>c)=P\left(\frac{\bar X-\mu}{S/\sqrt{n-1}}>\frac{c-\mu}{S/\sqrt{n-1}}\right)$$

because we're supposed to divide by the same expression on both sides of the inequality.

(Note: By $$s$$ I mean the r.v $$S$$ evaluated at a given sample)

The motivation for this question is the following: Imagine I wanted to test the null $$\mu \leq \mu_0$$. If we knew the population variance, then we would expect to reject the null if $$\bar X > c'>\mu_0$$. So,

$$P(\bar X>c')=P\left(\frac{\bar X-\mu_0}{\sigma/\sqrt{n-1}}>\frac{c'-\mu_0}{\sigma/\sqrt{n-1}}\right)$$

and we would chose $$\frac{c'-\mu_0}{\sigma/\sqrt{n-1}}:= q_{1-\alpha}$$, the $$1-\alpha$$ quantile for $$N(0,1)$$.

However, this type of reasoning cannot be done for the case at the begining of this question. We can prove that a similar rejection interval does indeed come out from using the Likelihood Ratio Test(LRT). I was wondering if there was a way to reach the same rejection interval without having to use the LRT...

Any help would be appreciated.

• What is the difference between $S$ and $s$? Are you sure it isn't a typo?
– dlnB
Mar 14, 2019 at 21:54
• @dlnB The difference is that $s$ is $S$ computed for a given sample, i.e. it's a constant. $S$ is not. Mar 14, 2019 at 21:57
• $P(\bar{X}_n>c) =P(\frac{\bar{X}_n-\mu}{s/\sqrt{n-1}}>\frac{c-\mu}{s/\sqrt{n-1}})$ is correct logic. Multiplying both sides by a positive constant or subtracting a constant from both sides preserves the inequality.
– dlnB
Mar 14, 2019 at 22:19

$$X_1,...,X_n$$ are iid $$N(\mu, \sigma^2)$$. The first step is to derive the distribution of $$\bar{X}_n= \sum_{i=1}^n \frac{1}{n}X_i$$. First notice that $$\frac{1}{n}X_i \sim N(\frac{\mu}{n}, \frac{\sigma^2}{n^2})$$ for $$i=1,...,n.$$ Then $$\bar{X}_n$$ is simply the sum of these iid variables $$\frac{1}{n}X_i$$, so $$\bar{X}_n \sim nN(\frac{\mu}{n} ,\frac{\sigma^2}{n^2})=N(\mu ,\frac{\sigma^2}{n}).$$ It follows that $$P(\bar{X}_n > c) = \int_{c}^{\infty} \frac{1}{\sqrt{2 \pi \sigma^2/n}} \exp\{-\frac{(z-\mu)^2}{2\sigma^2/n}\}dz.$$

This is one expression for the exact probability you describe, but requires $$\sigma^2$$ for calculation.

Following the $$t$$ approach you describe, $$P(\bar{X}_n>c) =P(\frac{\bar{X}_n-\mu}{s/\sqrt{n-1}}>\frac{c-\mu}{s/\sqrt{n-1}})=P(t(n-1) > \frac{c-\mu}{s/\sqrt{n-1}}),$$

which can simply be found by taking $$1-F(\frac{c-\mu}{s/\sqrt{n-1}})$$, where $$F(\cdot)$$ is the cdf for the $$t(n-1)$$ distribution.

• thanks for the answer, however, I don't think it's correct... we need to use $S$ and not $s$ for the pivot to have the $t(n-1)$ distribution. Mar 14, 2019 at 22:30
• I still don't understand what the two different notations mean. You write $s^2$ is sample variance, but use $S$ in your formula for $t(n-1)$. The "s" or "S" used in the $t$ formula is the estimated standard deviation from the sample.
– dlnB
Mar 14, 2019 at 22:33
• It's the same difference as the one we have between $X_i$ and $x_i$. Hum... I'm not going to be completely correct, but think of $X_i$ as a random variable and $x_i$ as an observation of the variable $X_i$. $x_i$ is a constant. Mar 14, 2019 at 22:37
• I see your confusion. $\bar{X}$ and $S$ are indeed random variables, so let $\bar{X}_n$ and $s$ denote realized values of those random variables, calculated from your sample $X_1,...,X_n$. A sample $X_1,...,X_n$ gives us realized values $\bar{X}_n$ and $s$ and therefore a realization of $\frac{\bar{X}_n-\mu}{s/\sqrt{n-1}}$, which is a realized value from a $t(n-1)$ distribution. Therefore $P(\frac{\bar{X}_n-\mu}{s/\sqrt{n-1}}>\frac{c-\mu}{s/\sqrt{n-1}})=P(t(n-1) > \frac{c-\mu}{s/\sqrt{n-1}}).$
– dlnB
Mar 14, 2019 at 22:48
• The problem is that we have only $\frac{\bar X-\mu}{S/\sqrt{n-1}}\sim t(n-1)$. We do NOT know the distribution of $\frac{\bar X-\mu}{s/\sqrt{n-1}}$ (because we do not know the population variance) Mar 14, 2019 at 23:00