Statalist


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

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


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

Steven

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.

Henrique




-----Mensagem original-----
De: [email protected]
[mailto:[email protected]] Em nome de Steven Proud
Enviada em: quinta-feira, 22 de novembro de 2007 06:40
Para: [email protected]
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 
deviation(y))^2/ny)]

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 
deviation(y))^2/(ny-1))]
?

Thanks,
Steven Proud

*
*   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/


__________ Informa��o do NOD32 IMON 2677 (20071122) __________

Esta mensagem foi verificada pelo NOD32 sistema antiv�rus
http://www.eset.com.br



*
*   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/



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