# [S] Flaw in power program - normal means

Eran Bellin,M.D. (belliney@idt.net)
Tue, 21 Jul 1998 16:54:55 -0400

I think that there is something wrong with the power program.
I asked for the normal mean power calculation of:

*** Power Table ***
mean1 sd1 mean2 sd2 delta alpha power n1 n2
1 66 4 80 4 14 0.05 0.8 2 2

This implies that if you have a group with mean of 80 and standard
deviation of 4
compared to a group with a mean of 66 and a standard deviation of 4 you
only need 2
members from each to find a statistically significant finding 80% of the
time at a .05 level.

Well, I then tested this by creating two vectors with these values and
then running t.tests on
samples of 2 members from each at a time and looked at the resultant p
values.

> boys<-rnorm(1000,80,4)
> girls<-rnorm(1000,66,4)

> for (i in
1:1000)(z[i]<-t.test(sample(boys,2,replace=T),sample(girls,2,replace=T))\$p.value)

I then asked, how many of these z observations have a p value of .05 or
less. The result
was:

> length(z[z<.05])
[1] 484
> length(z)
[1] 1000

only 48.4% had a value of .05 or less. I should have expected 80%.

Why the difference?

Sincerely,
Eran Bellin, M.D.
Department Outcome Analysis and Decision Support
Montefiore Medical Center
Bronx, N.Y.

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news