Expected value of probability of intersection. let's assume we choose at random two subsets $A$ and $B$ of a finite set $X$ (i.e. $|X|=n$). By randomness I mean that $Pr[x\in A] = \frac1{n}$ for each $x\in X$, the same for $B$. What will be the average size of their intersection? More formally, I would like to compute:
$$E[|A \cap B|\ |\ |A|, |B|]$$
I tried to write it as a sum of expected values with additional condition about the size of $A\cap B$, but it leads me to a result which is not necessarily less than $1$, so either I've made a mistake or my whole reasoning has been wrong. Is there any tricky computation of this expression? 
 A: The number of elements $|A\cap B|$ in the interesection of $A,B$ given the values of $|A|$ and $|B|$, i.e. $|A\cap B \mid |A|, |B|$ is a random variable that takes values in $$\max\{0, |A|+|B|-|X|\},\ldots, \min\{|A|,|B|\}$$ 
Then $|A\cap B| \mid |A|, |B|$ follows the hypergeometric distribution (and not the binomial as in my initial effort) with parameters $|X|=n$ the population size, $|A|=a$ the number of successes in the population and $|B|=b$ the sample size.  The roles of $|A|$ and $|B|$ are interchangeable! Hence the expected value of $|A\cap B|\mid |A|,|B|$ is equal to $$E[|A\cap B|\mid |A|, |B|]=\frac{|A||B|}{|X|}=\frac{ab}{n}$$

Another way to see this, is that the probability that any given element of $X$ lies in $|A\cap B|$ given the values of $|A|,|B|$ is due to independece equal to $$P(x\in A\cap B)=P(x\in A)P(x\in B)=\frac{a}{n}\frac{b}{n}=\frac{ab}{n^2}$$ So \begin{align}E[|A\cap B|\mid |A|,|B|]&=E\left[\sum_{i=1}^{n}\mathsf 1_{\{x_i\in A\cap B\}}\right]=\sum_{i=1}^{n}E\left[1_{\{x_i\in A\cap B\}}\right]\\&=\sum_{i=1}^{n}P(x_i\in A\cap B)=n\cdot \frac{ab}{n^2}=\frac{ab}{n}\end{align}
