When would you use a t-test instead of a z-test for a mean?
Simple meaning
Use a t-test when the variance is estimated from the sample, especially with modest n, because the t distribution has heavier tails.
Open the full page for Why, Steps, Example and Key takeaway.