Re: [R] Sampling from a Population

2012-12-08 Thread R. Michael Weylandt
Hi Lorenzo, This has the feel of a homework problem, but I will suggest to you that this is "sampling without replacement" and there exist easy mathematical formulas (no need to resort to R) to calculate your desired probability. Michael On Sat, Dec 8, 2012 at 11:54 AM, Lorenzo Isella wrote: >

[R] Sampling from a Population

2012-12-08 Thread Lorenzo Isella
Dear All, I hope this is not too off topic, but I am sure it has to be a one-liner in R. Suppose you have a population of size N and that you take a random sample of n_s individuals out of this population. This population includes a subgroup of n_i individuals. For any individual in n_i, what