# T-test: is the difference of the means in my sample's two subgroups equal to a given difference of means?(SPSS)

I've recently reread the section about t-test, comparing means in two independent subgroups and know the formula, how to compute the t-coefficient.
Now I'm facing the question, whether the difference in my subgroups is the same as the difference, given by some other, larger study. In the t-formula it is easy to insert the theoretical difference of means - just put in the numerator of $$T = { \bar x_1 - \bar x_2 \over \cdots}$$ the theoretical difference $$T = { (\bar x_1 - \bar x_2) - (\mu_1-\mu_2) \over \cdots}$$ (if I recall the formula correctly).

But I don't find an option in SPSS to insert that theoretical difference in the calculation.

Q: Is there any procedure to get that comparision or at least some workaround in SPSS?

Rereading the section in "Bortz, Statistik für Sozialwissenschaftler" it seems, that it could be a workaround, to simply "correct" for the theoretical difference. For instance if I have the theoretical difference of means being 2.5 (years of age of the groups of male and female students, male being 2.5 years older than the female in the larger study) then I could add 2.5 to the means of the female students (if (sex=1)age=age+2.5 .) and test for difference=0 now. Is that a meaningful option?

• Why would you treat the other study as it were a population, when it, too is based on a sample? Why is its own uncertainty not taken into account in your test? – Glen_b -Reinstate Monica Aug 11 '15 at 12:07
• @Glen_b: it is very easy to imagine, that the "larger study" is some survey of the census with a good exhaustion of the population and that one can find the very accurate estimate for the population in some journal's article. Then there is a class for introductory statistics where students take some (likely ad-hoc) sample with two groups and want to learn how to do the following task: test whether their heuristical difference of means deviates from the "theoretical"/"reference" one - according to the simple formula like in Bortz, but of course also in wikipedia et. al., using i.e. SPSS... – Gottfried Helms Aug 11 '15 at 14:52

Let $\delta = \mu_1-\mu_2$, then
$(\bar x_1 - \bar x_2) - (\mu_1-\mu_2)$
$\quad= (\bar x_1 - \bar x_2) - \delta$
$\quad= (\bar x_1- \delta) - \bar x_2 \qquad$ (1)
$\quad= \bar x_1 - (\bar x_2+ \delta) \qquad$ (2)