On 10/04/2010 09:09 PM, James Nead wrote: > Hi Thomas, > > Thanks for the reply. > > 1. In the first pick, I draw 'A' genes from N, without replacement. > 2. Similarly, in the second pick, I draw 'B' genes from N, without > replacement > (and 'C' genes from 'N' etc.) > 3. Order does not matter - so the two cases you cited are equivalent. > > I would like to find out the probability that 'n' of the genes are common to > all > three 'picks'. > > many thanks!
Hmm, a sort of cubic version of Fisher's test? Someone might well have studied this extensively, but it wasn't me.... However, there are three constraints on the 7 df 2x2x2 table, whereas the usual Fisher case puts two constraints on 3 df, so it's not like one cell determines the rest. With only 'A' and 'B' samples, it's a clear hypergeometric (capture-recapture) situation: Just color the balls that you caught in the first draw. If you draw a third time, coloring the recaptured balls, you'd get a hypergeometric mixture of hypergeometric distributions, which might be workable if the samples are not too large. Alternatively, in the large-sample regime, you can probably work out the mean and variance of 'n'... -- Peter Dalgaard Center for Statistics, Copenhagen Business School Phone: (+45)38153501 Email: pd....@cbs.dk Priv: pda...@gmail.com ______________________________________________ R-help@r-project.org 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.