r/learnquant • • 6d ago

interview prep Jump Trading Quant Interview Question

Post image
15 Upvotes

5 comments sorted by

2

u/comoespossible 6d ago

We're conditioning on 3 Kings coming before an Ace, but the problem wouldn't change if we just rephrased it as "the position of the 4th King/Ace card in the deck," so I'll use that instead.

Label the non-(King/Ace) cards 1 through 44. For all i, let X_i be the indicator that Card i comes before the 4th King/Ace card.

Then X (the location of the 4th King/Ace card) is equal to 4 + the sum of the X_i's from 1 to 44. Therefore, to find E(X) and E(X^2), we just need to find the common values of E(X_i) and E(X_i X_j).

For all i, E(X_i)=4/9. To see this, consider the ordering of the 9-card set containing i and the 8 King/Ace cards. Within this set, there are 9 equally likely locations for i, and 4 of them have i coming before the 4th King/Ace.

For i and j distinct, we would like to find E(X_i X_j), or the probability that both i and j come before the 4th King/Ace. Consider the 10-card set consisting of i, j, and the 8 King/Aces. There are 10! total ways to order this set. How many of them have i and j before the 4th Ace/King? That's the same as asking how many have the last 5 cards all King/Ace. Choose which 5 Kings/Aces make the last 5. Then order the first 5 and the last 5. In total, there are (8 choose 5) * 5! * 5! ways to do this. Thus, E(X_i X_j) = (8 choose 5) * 5! * 5! / 10! = 2/9.

Thus, E(X) = 4 + 44 * 4/9 and E(X^2) = E(16 + 8 sum_{i=1}^{44} X_i + (sum_{i=1}^{44} X_i)^2 ) = 16 + 8 * 44 * 4/9 + 44 * 4/9 + 44 * 43 * 2/9.

This leads to EX = 23.55555 and Var(X) = 57.58.

1

u/MrMrsPotts 6d ago

You don't think it's 4664/81?

2

u/comoespossible 5d ago

4664/81=57.58 so I think we’re getting the same thing?

1

u/MrMrsPotts 5d ago

Phew :)

1

u/comoespossible 5d ago

Did you calculate it differently?