1. ## confidence interval

Hi, this is a dumb question but can someone please explain to me when you're meant to use this confidence interval:

$\displaystyle \mu +- t_{\alpha/2, n -1} \sqrt{\frac{\sigma^2}{n}}$

and this one:

$\displaystyle \mu +- t_{ 1 - \alpha/2, 2n -2} \sqrt{\frac{\sigma^2}{n}}$

coz I keep using the wrong one at the wrong time so i keep getting my answers wrong

2. Some one else may want to verify what I say here since its been awhile since I've looked at this topic.
.................................................. ...........

In case you don't know, the value $\displaystyle t_{\frac{\alpha}{2},n-1}$ is the number for which if X follows a $\displaystyle t_{n-1}$ distribution, then $\displaystyle P(X > t_{\frac{\alpha}{2},n-1}) = \frac{\alpha}{2}$.

If we were to randomly chose n values $\displaystyle X_i 1 \leq i \leq n$ from a $\displaystyle N(u,\sigma^{2})$ distribution, the probability that $\displaystyle \bar X$ would fall in the interval $\displaystyle (u - t_{\frac{\alpha}{2},n-1} \cdot \sqrt{\frac{\sigma^2}{n}}, u + t_{\frac{\alpha}{2},n-1} \cdot \sqrt{\frac{\sigma^2}{n}})$ is $\displaystyle 1 - \frac{\alpha}{2}$.

Can you figure out why?

..............................................

To be honest, I don't recognize your second interval. Maybe its a mistake?

3. Thank you!!

Um yeahh i don't get the second one too.. but my lecturer used that interval to answer our assignment question which is why i got the assignment wrong. Unfortunately, semester has ended (final exam period now) so I can't ask him why we use that interval..

But here's the question that used that interval if anyone is interested:
Suppose that you want to conduct a $\displaystyle 2^3$ experiment as a completely randomised design and you want all of the 95% confidence intervals to be at most 1.5 units long. If you know that the variance of an individual response is about 4, how many replicates of each treatment combination should you have?

1) What does $\displaystyle 2^3$ mean?

2) Does "completely randomized design" mean we do not know the distribution of the variables we are sampling from?

5. A $\displaystyle 2^3$ design means that there are three factors, each with two levels each. The term "completely randomized" means essentially that you are assigning experimental units to treatments completely at random (e.g. gender doesn't work because I can't assign an individual's gender).

Determining the approximate sample size to get a particular diameter of the CI isn't too hard, but you need to be specific about which particular intervals you want. There are 8 groups; are you looking to guarantee a width on the CI's of the 8 group means? Also, is the confidence level experiment-wise (i.e. using simultaneous confidence intervals) or are you ignoring the fact that you are making more than one interval?

The degrees of freedom you use in when determining the sample size, making CI's, etc in this situation is $\displaystyle N - 8$, where N is the total number of observations for the entire experiment. You lose a degree of freedom for each parameter you have to estimate.

6. ohh i already have an answer to that question.. i only wrote that question up as an example of when you would use the second confidence interval that i have written up..

but my original question was when do you know when to use either the first confidence interval or the second one..?

7. It looks like the only difference between them is the degrees of freedom, and slightly different notation on the cutoff values. In which case, you just need to make sure you have your error degrees of freedom correct. In a factorial setting, it will always end up being the total number of observations, less the number of parameters you have to estimate.

If you have two groups and you want to look at their means, let $\displaystyle n$ be the number of observations per group. We have $\displaystyle 2$ means to estimate and $\displaystyle 2n$ total observations, so you end up with $\displaystyle 2n - 2$ degrees of freedom. In the $\displaystyle 2^3$ design, you'll end up with $\displaystyle 8n - 8$.