[R] One-sample test for p
murdoch at stats.uwo.ca
Thu Oct 16 14:16:35 CEST 2008
On 10/16/2008 7:35 AM, Peter Dalgaard wrote:
> rr400 wrote:
>> Hi, i am doing a statistics course and am having trouble with an exercise
>> where i need to determine whether my success rate at something is higher
>> than 80%.
>> I was successful in 29 out of 60 trials, so these were the commands i
>> entered into R:
>> Which returned:
>>  -6.132224
>> Which returned
>>  1
>> My problem is that i am meant to state a null and alternative hypothesis
>> which at the moment i have stated as p>0.8 (null) and p≤0.8 (alternative).
>> As things stand, though, a p-value of 1 suggests i should reject the null
>> hypothesis which can't be right since i am obviously successful less than
>> 80% of the time.
>> I am not sure where i am getting muddled. Any advice would be greatly
>> appreciated. Thanks!
> 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. 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.
> (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
More information about the R-help