[R] One-sample test for p

Peter Dalgaard p.dalgaard at biostat.ku.dk
Thu Oct 16 14:39:34 CEST 2008

Duncan Murdoch wrote:
>> This isn't really about R, and maybe it is homework, but now that we 
>> got you in the appropriate frame of mind:
>> (a) p values should look at "this or more unfavourable" events. You 
>> have arranged things so that that translates to -6.13 or _lower_. I.e. 
>> you're looking at the wrong tail.
> I think he was looking at the right tail, since his p value was 1.  

Yes, clearly, but then he needs to rearrange his definitions so that 
deviations go that way when data move away from the null (i.e., to look 
at p.0 - p.hat).

> Your 
> comment (b) is the important one; comment (c) might not be allowed by 
> his instructor, which is one reason I'm always reluctant to give advice 
> on other people's homework problems.

Not allowed to _play_? Surely not, I hope. Not allowed as the _solution_ 
is of course quite possible.


> Duncan Murdoch
>> (b) Make sure you get your accept/reject logic right. You _reject_ the 
>> null when data would be _un_likely if the null hypothesis were true.
>> (c) You might also want to play with binom.test and prop.test

    O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
   c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
  (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907

More information about the R-help mailing list