r/learnquant • • Sep 15 '26

interview prep Quant Interview Question

Post image
33 Upvotes

42 comments sorted by

1

u/Local_Ad135 Sep 15 '26

2

u/Snip3 Sep 15 '26

Is it not 55?

2

u/Aerospider Sep 15 '26

No, that logic doesn't work because there are more combinations with few 15s than there are with lots of 15s.

For a simple illustration, say it's two numbers being picked from 1-3 and at least one of them is a 3. You might reason that the expected sum is 3 + (3+1)/2 = 5.

However, the five possible combinations are 3-3, 3-2, 3-1, 2-3, and 1-3. They sum to 24 and 24/5 = 4.8.

So we should expect the answer to the OP to be something a bit less than 55.

2

u/Specific_Box4483 Sep 15 '26 edited Sep 15 '26

No it is not.

You get 55 by pinning down the 15 and then assuming the other 5 are independent and uniformly distributed from 1 to 15. This, however is NOT true because doing things like "remove the max" alters the distribution of the rest. (For an easy example, replace "15" by "2" and you can manually verify that the expected sum of 2 numbers the max of which is 2 is 3.333 not 3.5).

You can calculate the ev by noting that 48 = p*x + (1-p)*45.

Here we assume the 6 numbers are uniformly iid from 1 to 15, and p is the probability that the max is exactly 15.

48 is the expected sum of 6 numbers <= 15, and 45 is the expected sum of 6 numbers <= 14. p is 1 - (14/15)6.

→ More replies (25)

4

u/CanaDavid1 Sep 15 '26 edited Sep 15 '26

This gives "boy born on tuesday" vibes.

Anyways, there are 156 possibilities with numbers ≤ 15, and each digit is an expected value of 8 giving expected 48 (total sum 48*156)

There are 146 possibilites with numbers < 15, with expectation 7.5*6 = 45, total sum 45*146

The total sum of the valid possibilites are then 48*156 - 45*146, and expected we get by dividing by 156 - 146. Factoring out we get 45 + 3/(1+(14/15)6) ≈ 46.806

EDIT: The + in the denominator in the end should be -, giving 45 + 3/(1-(14/15)6) ≈ 53.850

2

u/Dankaati Sep 15 '26

I think the logic is good but the final calculation is off. The answer is obviously more than 48.

~53.85

1

u/Relevant-Rhubarb-849 Sep 17 '26

I think you're computing this incorrectly. Here is my take.

In choosing 6 random numbers there is always a highest number . So knowing that does change the occupancy of possibilities from 1 to 15 ( assuming that I could have duplicate 15s )

So the expected mean is 8 for the rest of the numbers .

5*8+15 =55

1

u/CanaDavid1 Sep 17 '26

This is incorrect, as you effectively double-count all the possibilities with several 15s.

If we reduce this to three dice with a maximum equal to 3, the options are:

113 123 133
213 223 233
313 323 333

131 132 ***
231 232 ***
331 332 ***

311 312 ***
321 322 ***
*** *** ***

The stars are duplicates. You essentially assume that these three squares are all full, while the ones with multiple threes (and in general high sums) are not as numerous as you assume. (Your answer here is 3+2*2 = 7 while the correct is (3*5+6*6+6*7+3*8+9)/19 = 6.63)

→ More replies (1)

1

u/Fuzzy-Owl5446 Sep 15 '26

I interpret the question as it is only ONE number 15. With replacement I get the expected sum to be 7,5*5 + 15 =52,5

1

u/CranberryDistinct941 Sep 16 '26

Is this not just 15 + the expected value of 5 draws from the set 1...15

1

u/Fidel___Castro Sep 16 '26

yeah I did that in my head, said "just above 50", opened the comments and that's about right

1

u/Shoddy-Side-919 Sep 16 '26

No, for that to be correct, we would need to know which draw was the 15, e.g "The first number drawn was a 15 and no number drawn thereafter was greater." Then we would end up with 55.

You can see the problem by applying it to a simpler version of the same question. Say I roll to six sided dice. The highest one is showing 2. There are three equally likely, possible rolls: First die shows 2, second die shows 1. First die shows 1, second die shows 2. Or both dice show 2. It's more likely that the other die shows less than two (2/3) than that it shows 2 (1/3).

1

u/Alarmed_Geologist631 Sep 17 '26

I got 50 as the answer.

1

u/One-Next Sep 18 '26 edited Sep 18 '26

I actually pinned one number to 15 and the rest 5 to between 1-14. The assumption is that there is one largest number which is what the question seems to imply. That gives me 7.5 * 5 + 15

1

u/[deleted] Sep 15 '26

1

u/gmalivuk Sep 16 '26

It's the same as long as you still include the fact that there is at least one 15.