Calculating Covariance of Deck of Cards

251 Views Asked by At

A deck of cards contains a total of 20 cards with 12 yellow cards, 4 purple cards and 4 red cards. We draw five cards without replacement. Let X be the number of purple cards drawn and Y be the number of yellow cards drawn.

What is the Cov (X,Y)?

So I obviously know the formula is E[xy]-E[x]E[y] and I know $P(x,y,z)=\frac{\binom{4}{x} \binom{12}{y} \binom{4}{z}}{\binom{20}{5}}$.

Now I have that $E[xy]$=$$\sum_{x}\sum_{y} \frac{\binom{4}{x} \binom{12}{y} \binom{4}{5-x-y}}{\binom{20}{5}}(xy)$$.

The problem is I don't know how to sum this. Is there a more simple calculation or if there is not how would I sum this?

Meanwhile for $E[x]E[y]$ since I believe this is hypergeometric I just did $E[x]=\frac{5(4)}{20}$ and $E[y]=\frac{5(12)}{20}$

If somebody can help me with the sum that would be appreciated!

2

There are 2 best solutions below

0
On

Use indicator functions. Label the card in the hand 1 to 5 and let $X_i$ and $Y_i$ indicate whether card $i$ is purple or yellow, respectively.

$$\begin{align}\mathsf E(X)&=\sum_{i=1}^5\mathsf E(X_i)\\&=5\cdot\tfrac 4{20}\\&=1\\[2ex]\mathsf E(Y)&=\sum_{j=1}^5\mathsf E(Y_j)\\[1ex]&=3\\[2ex]\mathsf E(XY)&=\sum_{i=1}^5\sum_{j=1}^5\mathsf E(X_iY_j)\\[1ex]&=\sum_{i=1}^5\mathsf E(X_iY_i)+\sum_{i=1}^5\sum_{j=1}^5\mathsf E(X_i)\,\mathsf E(Y_j)\,\mathbf 1_{i\neq j}\\[1ex]&~~\vdots\end{align}$$

0
On

I like Graham Kemp's answer better than the one I'm about to pitch, but I'll try to go a route free of measure theory that more closely resembles the approach you started.

Starting from the gross-looking sum: $$\sum_{x}\sum_{y} \frac{\binom{4}{x} \binom{12}{y} \binom{4}{5-x-y}}{\binom{20}{5}}(xy)$$

Let's just look at the actual terms in the double sum. Note that $x$ can range from $0$ to $4$, and $y$ can range from $0$ to $5$, and that their sum cannot exceed $5$. This leaves the following $(x,y)$ pairs to consider:

$$\begin{array}{ccccc} (0,0) & (1,0) & (2, 0) & (3, 0) & (4, 0) \\ (0, 1) & (1, 1) & (2, 1) & (3, 1) & (4, 1) \\ (0, 2) & (1, 2) & (2, 2) & (3, 2) \\ (0, 3) & (1, 3) & (2, 3) \\ (0, 4) & (1, 4) \\ (0, 5) \end{array}$$

Starting with 20 pairs is not encouraging, but notice that 10 of them are trivial; any term with either $x = 0$ or $y = 0$ will zero out in the summation because of the $(xy)$ term. It might not be fun to grit your way through the other 10 terms, but I don't think it's hard per se.

This is also one of those combinatorial problems where there is almost certainly some other clever elementary (i.e. non-indicator-function) way of framing the problem that makes the answer just drop right out, but I'll confess I don't immediately see it. If it were me, I'd just do the 10 terms at this point.