# Thread: Hypothesis Testing: When to use Z or T Test

1. ## Hypothesis Testing: When to use Z or T Test

It seems quite confusing to me when to use a Z or T test for hypothesis testing.

I know that when alpha is known, then use a Z-Test and when alpha is not known then use a T-Test, but isn't alpha the significance level, which is always told to us. I've been shown both test and it seemed that they both contained alpha, which althoughly confuses me.

If someone could explain the difference and when to use what, it would be great.

Cheers

2. Originally Posted by artikiller
It seems quite confusing to me when to use a Z or T test for hypothesis testing.

I know that when alpha is known, then use a Z-Test and when alpha is not known then use a T-Test, but isn't alpha the significance level, which is always told to us. I've been shown both test and it seemed that they both contained alpha, which althoughly confuses me.

If someone could explain the difference and when to use what, it would be great.

Cheers
They are very similar and sometimes you can choose either one. Here are some guidelines.

use Z when...
n>30

use t when...
n<30
comparing a sample to a known mean
comparing paired samples

3. Originally Posted by artikiller
It seems quite confusing to me when to use a Z or T test for hypothesis testing.

I know that when alpha is known, then use a Z-Test and when alpha is not known then use a T-Test, but isn't alpha the significance level, which is always told to us. I've been shown both test and it seemed that they both contained alpha, which althoughly confuses me.

If someone could explain the difference and when to use what, it would be great.

Cheers
I think you are confusing alpha (significance level) with sigma (standard deviation).

4. ## ok here it is....

Originally Posted by artikiller
It seems quite confusing to me when to use a Z or T test for hypothesis testing.

I know that when alpha is known, then use a Z-Test and when alpha is not known then use a T-Test, but isn't alpha the significance level, which is always told to us. I've been shown both test and it seemed that they both contained alpha, which althoughly confuses me.

If someone could explain the difference and when to use what, it would be great.

Cheers

In testing or in obtaining confidence intervals it really depends on a few things, mainly the underlying distribution and whether or not you know the population variance.
NOW, what people get confused about is when the central limit theorem makes the sample mean APPROXIMATELY normal, and people say n greater than 30 is large enough.
Well I guess that's the Berry-Esseen Theorem... http://en.wikipedia.org/wiki/Berry%E...Esseen_theorem

The point here is...
IF we have normality and we know sigma then

$\displaystyle {\bar X-\mu\over \sigma/\sqrt{n}}\sim N(0,1)$

Next case,
if we have normality and we do not know sigma then

$\displaystyle {\bar X-\mu\over s/\sqrt{n}}\sim t_{n-1}$

If we don't have normality, here it doesn't matter if we know sigma or not.
We use the CLT and for large n....

Both

$\displaystyle {\bar X-\mu\over \sigma/\sqrt{n}}$ and $\displaystyle {\bar X-\mu\over s/\sqrt{n}}$

are APPROXIMATELY N(0,1).

Same can be true for the two sample case...