[R] Fisher exact test?

Peter Dalgaard pdalgd at gmail.com
Mon Oct 4 22:51:03 CEST 2010


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.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list