Suppose there are two groups of objects. Group $1$ has $50$ unique objects, and Group $2$ has $100$ unique objects. These groups share $40$ identical objects (i.e. $40/50$ for group $1$ and $40/100$ for group $2$). Given that $20$ objects are selected from group $1$ and $15$ objects are selected from group $2$, what is the probability that $10$ objects will be identical between the two selections.
My main issue with this problem is that the two groups are different sizes with partial overlap. I'm not sure how to take that into account when I calculate some sort of cumulative probability for each selection. Further, even if a shared object is selected from each group, how do I account for the fact that the same shared object may not be selected from both groups? What I've been doing now is just simulating random selections, but I'd like to know if there is some probability calculation that's applicable.