If i test two hypotheses, one of which has a null that is -in fact- false and the other has a null that is -in fact- true, I want to know the probability that the first test will obtain a p value less than that of the second, given other parameters such as delta, sigma, and sample size. I am not interested in whether one, or the other. or both, or neither are above some threshold, I'm interested in the probability that one is larger than the other.
I can simulate the situation in R, and come up with a reasonable estimate that way, but I want to know how I can impute the answer exactly.
Using the program R:
> a=vector()
> b=vector()
> for (i in 1:1000) {
+ ai = rnorm(108, mean = 7, sd = 20)
+ a = c(a,t.test(ai)$p.value)
+ bi = rnorm(108)
+ b = c(b,t.test(bi)$p.value)
+ }
> q=rep(0,length=length(a))
> q[a < b]=1
> mean(q)
[1] 0.978
So, I find that approximately 98% of the time, the truly alternative hypothesis yields a lower p value, but how can I impute this result. I want to prove it mathematically.
Thanks for your help,
Nick
@Nick Sabbe What I think you are saying is that if the p value from the false null hypothesis equals a, then the probability that the p value from the true null hypothesis is less than a, is a. I get that, but what if I don't know the p value from the false null hypothesis test? What if I have two p values, and I know that exactly one of them comes from a hypothesis test in which the null is -in fact- false, what is the probability that it is the lower of the two p values? Assume all I know are the population parameters: delta, sigma, and N.