Calculating the Standard Error for a one sample T-test: σ/sqrt(n) or s/sqrt(n)?

7.8k Views Asked by At

Consider a case when you are looking to test whether a small sample deviates significant from the population (normally distributed) whence it is drawn. Both the population standard deviation (σ) and mean (μ) are known, as are the sample standard deviation (s) and mean (Xbar).

Because the sample is small, you will need to use a t-test. However, my question is, do we calculate the standard error as s/sqrt(n) or σ/sqrt(n)? With a z-test, we usually use σ if we know it, but I'm wondering if the same applies for a t-test.

1

There are 1 best solutions below

0
On

Strictly, speaking, if both $\mu$ and $\sigma$ are known, you have no reason to do a test.

I think you must mean that you want to test the null hypothesis $H_0: \mu = \mu_0$ against the alternative $H_a: \mu \ne \mu_0$ and that $\mu_0$ is a specified number.

z-test. If the numerical value of $\sigma$ is known, there is no need to estimate it using the sample standard deviation $S$. In that case you would have a z-test, with test statistic $$Z = \frac{\bar X - \mu_0}{\sigma/\sqrt{n}},$$ where $Z$ has a standard normal distribution if $H_0$ is true. Then you would reject $H_0$ at the 5% level of significance if $|Z| > 1.96.$

t test. If the numerical value of $\sigma$ is not known, then you would use a t-test, with test statistic $$T = \frac{\bar X - \mu_0}{S/\sqrt{n}},$$ where $T$ has Student's t distribution with $n - 1$ degrees of freedom if $H_0$ is true. Then you would reject $H_0$ at the 5% level of significance if $|T| > t^*,$ where $t^*$ (obtained from tables) cuts 2.5% of the area from the upper tail of Student's t distribution with $n - 1$ degrees of freedom.

Distinction between z-test and t-test. For $n > 30,$ you will find that the tabled value $t^*$ is just a bit larger than 1.96. This leads some authors to say you should use a t test only if $n$ is small.

However, if you use software, you will find that whenever you do a z test, you will be asked for the numerical value of $\sigma.$ Also, the "rule of 30" really only works for testing at the 5% level of significance. [At the 1% level, it would be the (seldom mentioned) "rule of 120." And if you're looking at P-values, no such rule suffices.]

The best rule for z-test vs. t-test is very simple:

If the numerical value of $\sigma$ is known, then use a z-test. If $\sigma$ is not known, then it is estimated by $S$ and you will use a t-test. The distinction has to do purely with whether $\sigma$ is known; it really has nothing to do with sample size.