0

Fairly simple question

In a country with $x$ people I choose two subsets sets, $A, B$ with uniform distribution. The sets I choose are of fixed size $|A| = a, |B| = b$ which i knew before choosing the sets.

What is the expected value of $|A \cap B|$?

Asaf Karagila
  • 393,674
Oria Gruber
  • 12,739

2 Answers2

2

For each person $h$ of that country, define the random variable $X_h$ as $1$ if $h$ is in $A\cap B$, and $0$ if not.

What is the expected value of $X_h$ for a given $h$? It's clearly

$$E[X_h]=1\times P(h \in A \cap B) + 0 \times (1-P(h \in A \cap B)) = P(h \in A \cap B).$$

Since $A$ and $B$ are chosen indepently from each other (that isn't explicitely stated, but seems a natural assumption), we have

$$P(h \in A \cap B) = P(h \in A)P(h \in B).$$

Because the sets are chosen uniformly from the subsets with cardinality $a$ and $b$, resp., this means

$$P(h \in A \cap B) = \frac{a}x\frac{b}x = \frac{ab}{x^2}.$$

The key observation now is that the expected value you seek equals the expected value of the sum of all those $X_h$ (sum taken over the set of all persons in this country, which I denote with $H$), and that that latter sum can be split into the sum of expected values (see linearity of expectation)

$$E[|A\cap B|]=E[\sum_{h \in H}X_h] = \sum_{h \in H}E[X_h] $$

In the latter sum each summand has the same value which we calculated above, so we finally get

$$E[|A\cap B|]=x\times \frac{ab}{x^2} = \frac{ab}{x}.$$

Ingix
  • 14,494
0

The expected value is just the probability that someone is counted in both sets. The probability of being in set $A$ is $a/x$ and in $B$ is $b/x$, so the probability of being in both sets is $ab/x^2$.

You can verify this by considering simple cases like $a=b=x$ where we get $1$, or $x=2$ and $a=b=1$ where we get $1/4$.

Suzu Hirose
  • 11,660
  • I think that's the probability the intersection is of size $1$, but I'm looking also for the probability that it's $2, 3 \dots $ all possible numbers for the intersection – Oria Gruber Nov 16 '22 at 08:16