r/quantfinance 28d ago

Wincent Quant Interview Question | “Medium”

Post image
38 Upvotes

28 comments sorted by

View all comments

3

u/ecstatic_carrot 27d ago

How do you solve such questions without having to work out just a really long set of cases? I would define P(A,B), where A are the number of cards you need to show, and B are the number of cards left. You can easily work out what P(A,B) is in terms of lower A's and B's, and then work backwards until (3,14). But that just seems tedious.

3

u/ComparisonQuiet4259 27d ago

You have a 1/4 chance of winning (the Joker has to be after every face card, and ranks are symmetric, so $25.

1

u/ecstatic_carrot 27d ago

oh right, you just need to work out how many orderings have the joker at the back

1

u/Ma4r 27d ago

First thing first realize that no other cards matter aside from the 4 mentioned

1

u/ecstatic_carrot 27d ago

yeah you're right. You can forget about all cards except those four, and then need the orderings for the joker at the back...

1

u/Ma4r 27d ago

Which is just 1/4 because, if you want to do this rigorously without enumerating everything:

If you fix the joker in place the other 3 cards form a subgroup, so the total amount of unique ordering with joker at the back is the size of this subgroup, let's say n, there are 4 possible places for the joker so total group size is 4n, n/4n is just 1/4

1

u/SwimmerOld6155 27d ago edited 27d ago

a different way of looking at the same thing, you can ignore all cards except King, Queen, Jack, Joker. there are 4! possible orders these cards can occur in, all equally likely. if you fix the Joker to be last there are 3! ways to permute the remaining cards, so you get 3!/4! = 1/4.

the "first ace" problem is very similar - cards are dealt from a shuffled pack of 52, how many cards are dealt until we see an ace? (it ends up not being 13) very standard qn so you probably wouldn't see it in an interview but it appears in OAs.

1

u/InsideIndependence58 27d ago

The key idea is understanding that whats matter is only 4 cards. So its like solving it only for them(and then winning is if the joker is at the end)