We can integrate the standard normal to find the following rules of thumb for the distribution density:

Let’s see how we can use this to estimate a confidence interval for the population mean \(\mu\) when we do not assume the underlying distribution, but we have many sampled means.

To build some intuition we can go back to the definition of the quantile: the point \(x_v\) for which \(CDF(x_v) = P(X \leq x_v) = v\). If our random variable is suitable for the law of large numbers, we can cast this into a normalized value and approximate it with the standard normal quantile, for example with \(v = 0.975\):

\[ \begin{align} P(X \leq x_{0.975}) &= 0.975 \\ P(\frac{X - \mu}{\sigma} \leq \frac{x_{0.975} - \mu}{\sigma}) &= 0.975. \end{align} \]

so the quantile we are looking for is:

\[ \begin{align} \frac{x_{0.975} - \mu}{\sigma} &= qnorm(0.975) = 1.96 \\ x_{0.975} &= \mu + 1.96 \sigma. \end{align} \]

With probability \(0.975\) a randomly chosen variable will satisfy \(x_i \geq \mu + 1.96 \sigma\) and by symmetry with probability \(0.975\) a randomly chosen variable will satisfy \(x_i \leq \mu - 1.96 \sigma\). This looks pretty close to our rule of thumb for \(2 \sigma\)! Since the density is split evenly among the tails, we have used \(v = 1-\alpha/2 = 0.975\) where \(\alpha = 0.05\), and say with \(95\%\) confidence that the population mean, \(\mu\), falls roughly inside the interval:

\[ \bar{X}_n - 2 \frac{\sigma}{\sqrt{n}} \leq \mu \leq \bar{X}_n + 2 \frac{\sigma}{\sqrt{n}}, \]

with the sample’s standard error, \(s = \sigma/\sqrt{n}\), replacing the population’s unknown standard deviation.

So in general,

\[ P(\mu \in \bar{X}_n \pm z_{(1-\alpha/2)} \frac{\sigma}{\sqrt{n}}) = 100(1-\alpha)\%, \]

where \(z_{(1-\alpha/2)}\) is the corresponding standard normal quantile.


Example

Every year an inquiry is made into whether the good citizens of some small hamlet would like to run juice through the water lines instead of water. A yes or no is collected from \(N = 1000\) people.

This is a binomial process which can be modeled with some underlying probabilities \(P(\text{yes}) = 1 - P(\text{no})\), but with a decently large population the mean vote begins to approximate a normal distribution. If we take the average every time, after 75 years we get an estimate for the mean response, \(\bar{X}_n =0.4012\), with deviation, \(S_d = 0.017\), and we can establish for the population mean, \(\mu\):

In other words we increase confidence by increasing the spread in our estimate. Nonetheless both of these ranges will usually cover the “true” mean of the simulated hamlet we were sampling from, where \(P = 0.4\) to vote yes.

Let’s say we’re not happy with this yet. We want more data! We keep polling the citizens, somehow convince our children and grandchildren to keep at it for \(40000\) years.

Now with \(S_d = 0.0155\), these confidence intervals are no better… Sometimes even worse!

Each sample is just too small to bring in the distribution, so we go over the nearest town of \(N = 20000\) and now we are able to reduce the spread, with \(S_d = 0.0029\).

And, finally, if we have the luxury of time and sample size, \(N = 20000\), \(S_d = 0.0035\):


<- Statistical distributions


Orbits! | code