# Formula confidence interval for difference in means - one sample t-test

I am looking for the formula of the confidence interval for the difference between means in a one sample t-test. I have only been able to locate the formula for a two sample t-test.

Let me give an example: I have the following ten scores

10,12,13,11.5,9,11,11.1,11.9,12.1,9.3


I want to know if the mean of these scores is significantly different from my population mean of 11.5. When I conduct a one sample t-test in SPSS I get the following results:

t obtained = -10.776
SIG (i.e., P) = 0.000
95% CI of the difference = -5.3363 to -3.4837.


I know how SPSS calculated t and P but not how it calculated the 95% CI of the difference. This 95% CI of the difference is not the same as the CI for the mean. The CI for the mean I can obtain by

$$CI =\bar{x} \pm t S/\sqrt{N}.$$

The confidence interval in this case is: 10.16,12.01. I get the same result if I calculate this in SPSS.

So my question is: what is the formula for the CI of the difference which SPSS produces? How do I get that range? I do not want the CI for the mean. Thanks.

-
When you have only one sample, how do you obtain two means? Are you saying you have a paired sample (that is, a dataset of $(X,Y)$ values)? –  whuber Jun 17 '11 at 18:59
@Whuber. No I mean a one sample t-test (as outlined in Healey Statistics: A Tool for Social Research). A one sample t-test is where you are comparing a sample mean to a population mean.The example they give is that you have a mean grade for a university population (4), a sample mean for 115 engineering students and you want to use your sample mean to decide if the mean grade of engineering students is different from the university mean (4). So you only have one sample. What is the formula for the CI for sample means in this case (a one sample t-test)? –  Anne Jun 17 '11 at 19:18
@Anne This is the first example in every statistics textbook. See the Wikipedia article, for instance. –  whuber Jun 17 '11 at 19:56
@ Whuber. This shows how to calculate the CI for the mean not the difference in means. They aren't the same thing or at least SPSS doesn't think so.- confused. –  Anne Jun 17 '11 at 20:06
Since the population mean is known, so just subtract it from your data points, or from your one-sample CI. It is rare for the population mean to be known so the software probably won't do this. –  Aaron Jun 17 '11 at 20:21