I have two datasets with both 50 samples ranging from 1965-2014. (The data contains the returns for W. Buffet over the 50 years and the returns from the S&P500, also over the 50 years.)

I calculated the sample mean and sample std.dev for both dataset. I want to make a confidence interval, but I'm not sure which statistic I should use.

My question is: Should I use a z-statistic because the sample sizes are "so big"? Or a t-stastic? And aren't there any rules that specifies how big the sample size should be for one to use the z-statistic and not the t-statistic?

The data is assumed to be niid.

  • 1
    $\begingroup$ The rule of thumb is, that the sample size has to be greater than 30 to apply the central limit theorem. $\endgroup$ Commented May 29, 2015 at 15:15
  • $\begingroup$ Can I mark you comment as the answer? $\endgroup$
    – Kristian
    Commented May 29, 2015 at 15:36
  • $\begingroup$ I don´t know exactly what you mean. A comment is just a commment, regardless what you do with it. You can´t mark it with a checkmark like an answer. Or do you want post the comment as an answer ? $\endgroup$ Commented May 29, 2015 at 15:47

1 Answer 1


The rule in the comment by @calculus is OK provided you are doing a 95% confidence interval (CI). But when the population standard deviation $\sigma$ is unknown and must be estimated by $s,$ it is best always to use a t interval with n - 1 df (49 in your case).

A 95% t-CI is $\bar X \pm t^*s/\sqrt{n}.$ For the t distribution with 49 df $t^* = 2.02.$ The values $\pm 2.02$ cut 2.5% of the area (probability) from the lower and upper tails of the t distribution, leaving 95% in the middle.

If you somehow knew $\sigma,$ the 95% z-CI would be $\bar X \pm 1.96 \sigma/\sqrt{n}.$ You wouldn't be far off to use this with $\sigma \approx s.$ The number 1.96 is from a z (standard normal) table.

However, with $n = 50,$ if you needed a 99% CI then you would have $t^* = 2.680$, but in a z-interval knowing $\sigma$ the number from normal tables would be 2.576.

So the rule is simple: (a) If you know $\sigma$ then do a z test and use 1.96 for a 95% CI. (b) If you don't know $\sigma$ and estimate it by $s,$ then do a t test and look up the number in a t table.

If you are using statistical software, this is the least confusing approach: choose either 'z-procedure' or 't-procedure', and you will be prompted to say what data to use and for any other necessary information. (Often CIs are given along with z-tests or t-tests.)

  • $\begingroup$ This was really a good answer. Thanks a lot. I did both the t-test and z-test to compare and the z-test wasn't off by much. $\endgroup$
    – Kristian
    Commented May 31, 2015 at 7:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .