Skip to content
Prev 314900 / 398506 Next

t-test behavior given that the null hypothesis is true

On 09-Jan-2013 08:50:46 Pavlos Pavlidis wrote:
Using the following code, I did not observe the behavious you describe.
The histograms are consistent with a uniform distribution of the
P-values, and the lowest bin for the P-values (when the code is
run repeatedly) is not consistently lower (or higher, or anything
else) than the other bins.

## My code:
N <- 10000
Ps <- numeric(N)
for(i in (1:N)){
  X1 <- rnorm(3,0,1) ; X2 <- rnorm(3,0,1)
  Ps[i] <- t.test(X1,X2,var.equal=TRUE)$p.value
}
hist(Ps)
################################################

If you would post the code you used, the reason why you are observing
this may become more evident!

Hoping this helps,
Ted.

-------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at wlandres.net>
Date: 09-Jan-2013  Time: 10:29:21
This message was sent by XFMail