# What is the difference between Welch T Test and Z-test?

I have got 2 large samples and want to compare the difference. There are 2 methods:

1. Assume the population variances are unknown and unequal, and use the Welch $t$ test.
2. Assume the population variances are known and unequal (estimated as sample variances, which is ok since my sample size is million level and the sample mean can be considered as normally distributed), and use the $Z$ test.

I found these 2 tests are pretty much the same formula and same result. So are these 2 tests the same when applied to the real world situation? And if not, what is the difference and when should I use the $Z$ test/welch $t$ test?

• Welch's test relates to the Behrens-Fisher problem . Fisher posed a distribution based on is controversial fiducial inference. Welch provided a test that works well under frequentist methods. The problem is that the usual t statistic doesn't have a t distribution because both variances are unknown and assumed to be unequal. The sample is assumed to be from two normal distributions. Welch approximated the t distribution with a t that has a fractional number for the degrees of freedom. – Michael Chernick Dec 13 '16 at 2:42

Correct, Welch is for unequal variances. $Z$-test is for large-sample approximation when the standard normal distribution approximates the $t$-distribution. For sample sizes above about $n=130$, you will find that $Z$-scores are close to $t$-variates. The $t$-distribution is not needed when there are hundreds of objects (or records), since the standard normal distribution approximates the $t$ distribution very well for large $n$.
• Uneven sample sizes ($n_1$ vs. $n_2$) I recall is an issue when comparing the t-test for unequal variances with the Welch test. – JoleT Dec 14 '16 at 0:42