Re: [R] stats question

From: Moshe Olshansky <>
Date: Thu, 31 Jul 2008 00:11:52 -0700 (PDT)

Hello Jason,

You are not specific enough. What do you mean by "significant difference"? Let's assume that indeed the incidence in A is 6% and in B is 10% and we are looking for Na and Nb such that with probability of at least 80% the mean of Nb sample from B will be at least, say, 0.03 (=3%) above the mean of Na sample from A. The solution is not unique.
If Mb is the mean of the sample from B and Ma is the one from A, using Normal approximation we get the Mb is approximately normal with mean 0.10 and variance 0.1*0.9/Nb and Ma is approximately normal with mean 0.06 and variance 0.06*0.94/Na, so Mb - Ma is approximately normal with mean 0.04 and variance 0.09/Nb + 0.0564/Na. So let V be the maximal variance for which the probability that a normal rv with mean 0.04 and variance V is above 0.03 equals 0.80 (finding such V is straightforward). Then you must choose Na and Nb which satisfy 0.09/Nb + 0.0564/Na <= V. One such choice is Nb = 2*0.09/V, Na = 2*0.0564/V.

As I said, this solution is only approximate and probably not optimal, so see what other people say.



> From: Iasonas Lamprianou <>
> Subject: [R] stats question

> To:
> Received: Thursday, 31 July, 2008, 2:46 PM
> Dear friends,
> I am not sure that this is the right place to ask,  but
> please feel free to suggest an alternative discussion
> group.
> My question is that I want to do a comparative study in
> order to compare the rate of incidence in two populations. I
> know that a pilot study was conducted a few weeks ago and
> found 8/140 (around 6%) incidence in population A.
> Population B was not sampled. Assuming this is (about) the
> right proportion in the Population A what is the sample
> size I need for population A and B in the main study, in
> order to have power of 80% to idenitfy
> significant differences? I would expect the incidence in
> population B to be around 10% compared to the 6% of the
> Population A.
> Any suggestions? How can I do this in R?
> Jason
> __________________________________________________________
> Not happy with your email address?.
> Get the one you really want - millions of new email
> addresses available now at Yahoo!
> ______________________________________________
> mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained,
> reproducible code. mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 31 Jul 2008 - 07:16:50 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 31 Jul 2008 - 13:33:03 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive