[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RES: Problem with ttest in stata 8/9?

From   "Henrique Neder" <>
To   <>
Subject   st: RES: Problem with ttest in stata 8/9?
Date   Thu, 22 Nov 2007 08:08:02 -0200


The denominator n-1 in your formula is introduced by Stata in the standard
deviation expression sd(x) = sqrt((sum(Xi - Xmean)^2)/(n-1)). We don’t need
to convert the nx and ny to nx - 1 and ny - 1 in your expression because in
the standard error calculus we make sd(Xmean) = sqrt(sd(X)/n) where Xmean is
the sample mean of X.


-----Mensagem original-----
[] Em nome de Steven Proud
Enviada em: quinta-feira, 22 de novembro de 2007 06:40
Assunto: st: Problem with ttest in stata 8/9?

Dear Statalisters

Apologies if this has been covered before.

I have become slightly confused whilst trying to use ttest in stata with an 
unequal variance in each sample.

the command ttest x y, unequal unpaired in stata calculates the t-statistic 
as follows

t=(mean(x)-mean(y))/sqrt[((standard deviation(x))^2/nx)+(standard 

Now, I believe that this may give biased results, as we do not know the true

value of the population standard error, and so estimate it from standard 
deviation(x), so we should estimate it as  [standard deviation (x)]/(nx-1)

Therefore, should the t-statistic not be calculated

t=(mean(x)-mean(y))/sqrt[((standard deviation(x))^2/(nx-1))+(standard 

Steven Proud

*   For searches and help try:

__________ Informação do NOD32 IMON 2677 (20071122) __________

Esta mensagem foi verificada pelo NOD32 sistema antivírus

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index