RE: st: ttest

 From "Nick Cox" To Subject RE: st: ttest Date Wed, 21 Feb 2007 19:43:16 -0000

```I have been on the look-out for textbook expositions
for some years since someone pointed it out and I
realised it was true and wondered why I had not
been aware of it previously. But it's still helpful
to know textbook sources to refer people to.

The main idea follows from focusing on regression
as averaging. I use -ave()- here as an operator rather than
-E()- to underline that this applies to data, not models.

The regression line a + bx is ave(y | x). If x is 0 or 1
then

ave(y | 0) = a

and

ave(y | 1) = a + b

and so

ave(y | 1) - ave(y | 0) = b

Thus the difference between the means is equal to
the absolute value of the numerator of the t
statistic, and the only detail that remains
is the denominator.

This isn't a proof in anybody's sense, but I've
found it useful in motivating the link to others.

Nick
n.j.cox@durham.ac.uk

Ronán Conroy

> On 16 Feabh 2007, at 16:26, Daniel Hoechle wrote:
>
> > The Stata-manual entry on [R] "ttest - Mean comparison
> tests" (p.486)
> > states that Student's t-test for the equality of means can be
> > replicated by aid of a simple linear regression if the two groups'
> > variances are assumed to be unknown but identical.
> >
> > I would highly appreciate if anyone could give me a reference with a
> > formal proof of this relationship. Thanks a lot in advance.
>
> Gosh - hard to think of a published paper that shows this. You will
> find it demonstrated in many introductory textbooks. My favourite is
>
> Judd, C. M., & McClelland, G. H. (1989). Data analysis: A model
> comparison approach. New York: Harcourt Brace Jovanovich.
>
> I'd give you a page reference but some scunner has made off with my
> copy (my PhD student I think)

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```