2

Suppose we draw 2 cards from a standard 52 card deck with value 1 - 13 (from Ace to King). How would expected values and variance compare with or without replacement?

$E[X] = 14$ for both cases (linearity of expectation)

$Var(X) = E[X^2] - E[X]^2$ however this seems like it would take incredibly long to compute for all the possible sums, is this the right approach? Would the variances even be different?

shrizzy
  • 784
  • 4
  • 17
  • 2
    The variances would definitely be different. The easy way to see this intuitively is to ask the same question about the sum after drawing $52$ cards with and without replacement. – Robert Shore Nov 17 '22 at 16:54

3 Answers3

4

Let $X$ and $Y$ be the ranks of the two cards drawn.

$\small\begin{align}\mathsf {Var}(X+Y)&=\mathsf E(X^2)+2\mathsf E(XY)+\mathsf E(Y^2)-\mathsf E(X)^2-2\mathsf E(X)\mathsf E(Y)-\mathsf E(Y)^2\\&=2\mathsf E(X^2)+2\mathsf E(XY)-2\mathsf E(X)^2-2\mathsf E(X)\mathsf E(Y)\\&=2\mathsf E(X^2)+2\mathsf E(XY)-4\mathsf E(X)^2\end{align}$

These terms are not that hard to evaluate and only $\mathsf E(XY)$ changes if the cards are drawn with or without replacement.

You have already evaluated $\mathsf E(X)$ correctly, and $\mathsf E(X^2)$ will be evaluated similarly.

In the case of "with replacement" $\mathsf E(XY)$ will equal $\mathsf E(X)^2$ because $X,Y$ will be independent and identically distributed.

In the case of "without replacement" the joint probability function shall be $52/51$ times larger except in the selection of identical cards (which must be excluded†).


$$\begin{align}\mathsf E(XY) &= \begin{cases}\tfrac{16}{52^2}\sum_{k=1}^{13}\sum_{j=1}^{13}jk &:&\text{with replacement}\\ \tfrac{16}{52\cdot 51}\sum_{k=1}^{13}\sum_{j=1}^{13} jk-\tfrac{4}{52\cdot51}\sum_{k=1}^{13}k^2&:&\text{without replacement}^\dagger \end{cases}\\[1ex]&=\begin{cases}\mathsf E(X)^2&:& \text{with replacement}\\\tfrac{52}{51}\mathsf E(X)^2-\tfrac{13}{51}\mathsf E(X^2)&:&\text{without replacement}\end{cases}\end{align}$$

Graham Kemp
  • 133,231
0

this seems like it would take incredibly long to compute for all the possible sums, is this the right approach?

Even if enumerating all possible combinations (which for just two cards it would be difficult to significantly improve upon), there are only $\binom{52}{2} = 1326$ possibilities, which is trivial for a computer. The variances are 28 and about 27.45 with and without replacement respectively.

0

There's a general formula, proved here, that you can apply to get the without-replacement variance:

Let $X_1, X_2,\ldots,X_k$ be drawn at random without replacement from a finite population of $n$ items, and let $S_k:=X_1+\cdots+X_k$ be their sum. Then $$\operatorname{Var}(S_k)=k\left(\frac{n-k}{n-1}\right)\sigma^2,$$ where $\sigma^2$ is the variance of a single draw.

Given the above formula, it's enough to calculate the variance of a single draw from your population. Note that a single draw $X$ has distribution $P(X=i)=\frac1{13}$ for $i=1,\ldots,13$, even though the population has four copies of each number. The variance of $X$ is $\sigma^2=\frac{13^2-1}{12}$, as calculated in this answer. So when $k=2$ we get the variance of the sum of two draws without replacement is $$2\cdot\left(\frac{52-2}{52-1}\right)\frac{13^2-1}{12}\approx 27.45.$$

grand_chat
  • 40,909