The expected value of three cards when subtracting the lowest.

56 Views Asked by At

Suppose the values of the cards are assigned based on their number where possible and for the remaining cards we have $J=11, Q=12, K=13, A=14$. What is the expected value of three drawn cards when I subtract the lowest one?

My (limited) theoretical understanding led me to the following value. Please excuse any notation errors, as I'm an enthusiastic amateur unsure of the proper conventions:

$$\mathbb{E}\left( \text{sum of two highest cards $-$ lowest card} \right)$$ $$ = \frac{1}{13 \choose 3}\sum_{\text{all combinations}} \left( \text{sum of two highest cards $-$ lowest card} \right).$$

I computed this value using Wolfram Alpha and got 15 which doesn't sound senseless to me. However, when I simulated this in Python by drawing three cards 10.000.000 times and computing the value of interest my results suggest the expected value is 14.5. I know there is always randomness involved in simulation but with a sample size like this yielding the same result multiple times I am now convinced my theoretical value was incorrect.

For completeness my Wolfram Alpha code:

{ "input": "totalValue = 0; combinations = Subsets[Range[2, 14], {3}]; Do[sorted = Sort[combination]; totalValue += Total[Take[sorted, -2]] - First[sorted], {combination, combinations}]; N[totalValue/Length[combinations]]" }

As well as my Python code:

np.mean([sum(sorted([rd.randint(2, 14) for _ in range(3)])[1:]) - sorted([rd.randint(2, 14) for _ in range(3)])[0] for _ in range(10000000)])

1

There are 1 best solutions below

0
On BEST ANSWER

This is a problem of expectation, and such problems are easier to solve because they deal with averages

We firstly take the numbers to be from $1-13$ (we can always add $1s$ later)

Consider the $13$ points making cuts to divide a line of length $1$ into $14$ equal parts to reflect where the points will fall on a $0-1$ scale, which wil be $1/14, 2/14,...13/14$

And three randomly chosen values will on an average divide the line into $4$ equal parts at $1/4,2/4,3/4$

So to find where the highest sampled point falls, we have
$k_3/14 = 3/4 \Longrightarrow k_3 = 42/4 = 10.5$

Similarly, $k_2/14=2/4 \Longrightarrow k_2 = 28/4 =7$, and $k_1= 14/4 = 3.5$

We now need to add $1$ to each of the above values (to make the numbers $2-14$), thus

$k_3=11.5,\; k_2= 8,\; k_1= 4.5$

and finally, $k_3 + k_2 - k_1 = 11.5+8-4.5 = 15$
which corresponds exactly to the value you got using Wolfram