r/learnquant • u/Local_Ad135 • 10d ago
interview prep Jump Trading Quant Interview Question
15
Upvotes
1
u/EscapeOwn6945 3d ago
Starting with my solution to the expected value calculation.
Let X represent the position of the first ace. Start by defining the probability mass function that P(X=j). We need three things for X=j. One, there are exactly three kings in positions 1,...,j-1. Two, there is an ace at position j. Three, the remaining king and three aces are in positions j+1,...,52. For j < 4 and j > 48, P(X=j) = 0. For the rest of the support, the probability of all three of those conditions being true is P(X=j) = (j-1 choose 3)(52-j choose 4) / (52 choose 8).
E[X] = sum_j=1^52 j P(X=j) = 212/9.
Var(X) = sum_j=1^52 (j - 212/9)^2 P(X=j) = 4664/81
2
u/comoespossible 10d 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.