# Calculating the confidence interval that with proability $x$, the population mean lies within $\pm D$ of the sample mean $m$, when $N > 100$

Suppose one has a series of $$N$$ ($$N > 100$$) data points sampled from a population with unknown distribution. $$\mu$$, the population mean, and $$\sigma^2$$, the population variance, are thus both unknown.

I'd like to find the interval $$D$$ around the sample mean $$m$$, such that $$P(m - D < \mu < m + D) = x$$. In other words, the probability that $$\mu$$ lies within distance $$D$$ of $$m$$ is $$x$$.

Since I do not know the true population variance, I only have an estimate of it via the sample variance, which I call $$s^2$$. This means that I only have an estimate of the standard error $$s/\sqrt{N}$$.

This would mean that one would have to use the Student t-distribution to determine $$D$$. However, Wikipedia has the following comment:

Note: The Student's probability distribution is approximated well by the Gaussian distribution when the sample size is over 100. For such samples one can use the latter distribution, which is much simpler.

Does this mean that in my use case, I can effectively assume that $$s^2$$ is an excellent approximation of $$\sigma^2$$, and thus proceed with the steps one would use if they knew $$\sigma^2$$ in order to determine the confidence interval?

If $$\sigma$$ is known, you use Gaussian distribution. When it is unknown, to account for the uncertainty over possible $$\sigma$$'s, you use student-t distribution. So, the issue is the unknown variance. When the student-t distribution is well approximated by Gaussian with large samples, the problem with uncertainty over $$\sigma$$ decreases and the two distributions become closer. Of course, this means better approximation to $$\sigma$$, however it's not an excellent approximation (e.g. you wouldn't even still have excellent approximation to the mean, $$N=100$$ is quite small). The essence here is the uncertainty over $$\sigma$$ decreases to a level such that it doesn't affect the distribution of the mean significantly.
• Alright, what if I have $N = 18000$, which is the smallest data set I actually have? Jan 19 '20 at 1:25
• With $N>100$, you can use gaussian distribution instead of student-t as noted in wikipedia. For the excellent approximation, a mathematical definition of excellence should be made. Jan 19 '20 at 10:23