Probability and Combinatorics without replacement If I have a sample space of $A$ and I randomly select $a$ elements, mark them, put them back into the sample space, then randomly select $b$ elements and I want to know what the probability is that $a$ and $b$ have precisely $y$ elements that are the same, how might I go about this?
The way I'm currently thinking about this is to break the problem into two parts:


*

*In the first selection I mark $a$ elements. Thus in order for me to choose exactly $y$ elements in the second selection, I must have marked at least $y$ elements in the first selection and now I need to make sure I select exactly $y$ of the marked elements of $a$.
The event, $E_1$, that I select at least $y$ elements in the first selection I'm confused on. Do I even needs this?

*The event, $E_2$, that when I select $b$ elements exactly $y$ of these are ones that I selected in the $a$. Can I do this with conditional probability?
 A: Let $x$ denote the total number of elements in $A$.

Calculate the number of ways to choose $b$ elements from $A$, such that:


*

*$y$ elements are marked

*$b-y$ elements are not marked


$$\binom{a}{y}\cdot\binom{x-a}{b-y}$$

Calculate the number of ways to choose any $b$ elements from $A$:
$$\binom{x}{b}$$

Hence the probability is:
$$\frac{\binom{a}{y}\cdot\binom{x-a}{b-y}}{\binom{x}{b}}$$
A: Regretfully, I do not have enough reputation to comment on your question. :S
If I correctly understand and $A$ is finite, then the following can work.
After marking you have two classes, the marked which has $a$ elements and the non-marked which has $|A|-a$ elements. Denote by $\xi$ the number of elements which are marked from the selected $b$. You are looking for the probability
$$
P(\xi = y),
$$
where $y$ is at most $b$.
$$
P(\xi =y)=\dfrac{\binom{a}{y}\cdot \binom{|A|-a}{b-y}}{\binom{|A|}{b}}.
$$
Here $\xi$ is said to have a hipergeometric distribution. If I misunderstood your problem, please let me know and I can delete the answer to work out other one...
