Calculating enrichment

42 Views Asked by At

My question concerns how enriched something is as im trying to combine several lists of uneven group size and the answer is escaping me. So basically, I have 6 groups and I want to compare them with another set of 6 groups and find the groups that overlap the most. The groups are not of equal size and the overlap is not complete, so each group can have unique entries.

Mock example with a 2x 2 groups

Group 1: A: 100 B: 500

Group 2: X: 50 Y: 20

Overlaps:

AX: 15 AY: 10 BX: 10 BY: 5

The question that puzzles me is whether the overlap AX is larger than the overlap BY. What I thought to do is to simply remove the effect of unequal group sizes by diving by it. So the answer is::

AX: 15 / (50/50) / (100/500) = 75

BY: 5 / (20/50) / (500/500) = 12.5

Making the overlap between AX larger than BY or is it

AX: 15 / ((50/50) / (100/500)) = 3

BY: 5 / ((20/50) / (500/500)) = 12.5

Making the overlap between BY larger than AX or is it another solution?

Thanks in advance