t-test

http://en.wikipedia.org/wiki/Student's_t-test

# one sample

$t=\frac{\hat{\beta}-{\beta}_{0}}{{S}_{\hat{\beta}}/\sqrt{n}}$

d.f.=n-1

# Independent two samples t-test

## Unequal sample size, equal variance

$t = \frac{\hat {\beta_1} - \hat{\beta}_2}{S_{\beta_1\beta_2} \cdot \sqrt{\frac{1}{n_1}+\frac{1}{n_2}}}$

where

$S_{\beta_1\beta_2} = \sqrt{\frac{S_{\beta_1}^2(n_1-1)+S_{\beta_2}^2(n_2-1)}{n_1+n_2-2}}$

d.f.=$n_1+n_2-2$

## Equal sample size, equal variance

The same as above, just $n_1=n_2=n$

## Unequal sample size, unequal variance

$t = {\overline{X}_1 - \overline{X}_2 \over s_{\overline{X}_1 - \overline{X}_2}}$

where

$s_{\overline{X}_1 - \overline{X}_2} = \sqrt{{s_1^2 \over {n}_1} + {s_2^2 \over {n}_2}}$

$\mathrm{D.F.} = \frac{(s_1^2/n_1 + s_2^2/n_2)^2}{(s_1^2/n_1)^2/(n_1-1) + (s_2^2/n_2)^2/(n_2-1)}$

page revision: 5, last edited: 05 Sep 2009 08:19