[R] Simulating the p-value of a test statistic

markleeds at verizon.net markleeds at verizon.net
Sun May 25 04:15:27 CEST 2008


i think you should resend your question to the list (but this is 
sounding more and more like a homework problem so i don't know if you 
will get much response.  all i'll say is that P(T > t ) = 1 - P( T < t 
). But P( T < t ) is the cumulative distribution of T ( and any random 
variable  ) is
uniformly distributed ) so you can generate uniform random variables ( 
as Duncan mentioned ) but i'm unsure what you do from there
with these uniform RV's ? Let me cc the R-help group ( hopefully you 
don't mind ) because i'm interested myself now that you brought it up.




On Sat, May 24, 2008 at  9:52 PM, ampad1cb at cmich.edu wrote:

> Dear Friend,
>
> The problem is this suppose you have a test statistic T and you dont 
> know its distribution, suppose t is an observed value of T. How can I 
> find P(T>t) by simulation, that is the p-value of the test statistic?
>
> -Clement



More information about the R-help mailing list