> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Nair, > Murlidharan T > Sent: Thursday, August 09, 2007 12:02 PM > To: Nordlund, Dan (DSHS/RDA); r-help@stat.math.ethz.ch > Subject: Re: [R] small sample techniques > > n=300 > 30% taking A relief from pain > 23% taking B relief from pain > Question; If there is no difference are we likely to get a 7% > difference? > > Hypothesis > H0: p1-p2=0 > H1: p1-p2!=0 (not equal to) > > 1>Weighed average of two sample proportion > 300(0.30)+300(0.23) > ------------------- = 0.265 > 300+300 > 2>Std Error estimate of the difference between two > independent proportions > sqrt((0.265 *0.735)*((1/300)+(1/300))) = 0.03603 > > 3>Evaluation of the difference between sample proportion as a > deviation from the hypothesized difference of zero > ((0.30-0.23)-(0))/0.03603 = 1.94 > > > z did not approach 1.96 hence H0 is not rejected. > > This is what I was trying to do using prop.test. > > prop.test(c(30,23),c(300,300)) > > What function should I use? > >
I sent this from work but it seems to have disappeared into the luminiferous ether. The proportion test above indicates that p1=0.1 and p2=0.07666667. But in your t-test you specify p1=0.3 and p2=0.23. Which is correct? If p1=0.3 and p2=0.23, then use prop.test(c(.30*300,.23*300),c(300,300)) Hope this is helpful, Dan Daniel J. Nordlund Research and Data Analysis Washington State Department of Social and Health Services Olympia, WA 98504-5204 ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.