# Confidence Intervals: When to use what formula. I'm completely confused

I'm working on a few confidence interval questions, each with slight differences that make it very hard to determine what to use.

An electric scale gives a reading equal to the true weight plus a random error that is normally distributed with mean 0 mg and standard deviation = 0.1 mg. Suppose that the results of five successive weighings (in mg) of the same object are as follows:

### Heading 3.142, 3.163, 3.155, 3.150, 3.141 .

a) Compute a 95 percent confidence interval estimate of the true weight.

b) Compute a 99 percent confidence interval estimate of the true weight.

So here, the true mean is known. The standard deviation is known and all stats associated with the sample is known. What formula is used in this situation? The student-t? I tried but it's long and I think there's a faster way.

Each of 16 science students independently measured the melting point of lead. The sample mean of these measurements was 330.2 degrees centigrade.

a) If the standard deviation of such measurements is known to be 14, find a 99 percent two sided confidence interval estimate of the true melting point of lead.

b) Suppose that the population variance is not known in advance. If the sample standard deviation is 15.4 degrees centigrade, compute a 99 percent two-sided confidence interval of the true melting point of lead.

In one situation we have the Standard Deviation, in the other we only have the sample standard deviation. What is used here?

-
The true mean is not known in your first problem. Why would you say it is? –  Michael Hardy Nov 16 '12 at 4:01
You don't use Student's $t$ when the population standard deviation is known. (But in practice it never is.) –  Michael Hardy Nov 16 '12 at 4:02
That was my next question! When do we ever know the population standard deviation, but nothing else about it?? –  Imray Nov 16 '12 at 5:04

First question: Imagine doing the weighing $5$ times. Let random variables $X_1,\dots, X_5$ be the results. Now look at the random variable $Y=(X_1+\cdots+X_5)/5$.

This random variable is normal, with mean the true mean, and standard deviation equal to $\dfrac{1}{\sqrt{5}}$ times the standard deviation of any $X_i$, in this case $0.1$.

Now compute the sample mean, that is, add up the observations, divide by $5$. Suppose the result is $a$. Then our symmetric $95\%$ confidence interval is the interval that goes from $a-1.96\dfrac{0.1}{\sqrt{5}}$ to $a+1.96\dfrac{0.1}{\sqrt{5}}$. The $99\%$ confidence interval is obtained similarly, with $2.57$ replacing $1.96$. I assume you know where these numbers come from.

For the situation where the population standard deviation is not known, one uses Student's $t$-distribution with $n-1$ degrees of freedom instead of the normal. Information can be found here. You will need to locate appropriate tables. (For largish $n$, there are no tables, but in that case one can safely assume that the sample standard deviation is the true standard deviation.)

-
Thanks that is very helpful. So student-t is used when pop. SD is not known, otherwise it's done the regular way. Are there any tips like this you could share? –  Imray Nov 16 '12 at 2:54
I added a little bit about large $n$, where one can get adequate accuracy by using the "regular" way. –  André Nicolas Nov 16 '12 at 2:58
What if the random variables $X_1, X_2,....$ were not normal? Would there be any way to estimate their mean/SD etc? –  Imray Nov 16 '12 at 3:03
If the $X_i$ are independent, identically distributed, and their mean, variance exists (is finite), then for large $n$ one can use the Central Limit Theorem to conclude that $(X_1+\cdots+X_n)/n$ has a close to normal distribution. Then one can use the "regular" method to find confidence intervals for the mean. This happens very frequently, in polling. We are looking at a sum of Bernoulli ($0$ or $1$) random variables, but that's no problem. –  André Nicolas Nov 16 '12 at 3:11