[Math] Hypothesis testing for normally distributed random variable

random variablesstatistics

I have some random variable: ${X ~ N(\mu, 1)}$

I define null hypothesis and alternative hypothesis as follows:

${H_0 : \mu = 0}$

${H_1 : \mu \neq 0}$

Then, let ${x}$ be a number that comes out of my random variable.

I want to reject my null hypothesis if ${|x| \geq 3}$

And then I need to calculate probability of possible errors.

So, first of all I need to find the test statistic:

${ \displaystyle z = \frac{\bar{x} – \mu_0}{ \displaystyle \frac{s_x}{\sqrt{n}}}}$

I know that ${\mu_0}$ = 0 and sample size should probably be equal to ${1}$ (?).

How to calculate ${\bar{x}}$ (sample average)? Is it the same as expectation?

My question may be trivial, but I'm totally confused with it.

Best Answer

A "sample" of $1$ is highly unusual, and therefore it is reasonable to be confused. The random variable is known to have variance $1$. The mean is not known, else we would not be doing the test of hypothesis.

As you wrote, we reject if the absolute value of the sample mean is $\ge 3$. The sample mean in this case is just the value taken on by the random variable. (The average height of a group consisting of one person is the height of that person.)

Under the hypothesis $H_0$, the absolute value is $\ge 3$ with probability $\Pr(|Z|\ge 3)$, where $Z$ is standard normal. So you will falsely reject $H_0$ with probability $\Pr(|Z|\ge 3)$.

You can calculate this number from information available in tables of the standard normal. I get about $0.0026$.

Related Question