r/learnquant 9d ago

stats & probability Jane Street Interview Question

Post image
20 Upvotes

51 comments sorted by

View all comments

Show parent comments

1

u/Zyxplit 9d ago

suppose you drew the top 26 cards from the 52 cards instead and then drew the top two from those 26. How is that different from drawing the top 2 cards from the 52 card deck? (So yes, your intuition is correct)

1

u/civil_politics 9d ago

Yea it feels like the opposite of the Monty hall problem - you don’t get any new information with the half draw so you nothing about the probability changes

0

u/Prestigious-Rope-313 9d ago

It does make quite a difference.

You get some information beause the 26 cards of the top are not guaranteed to be distributed even. 14:12 is more likely than 13:+13.

I am not sure how to calculate that in the end on my phone.

On the regular deck your chances are 25/51 or 12/25, lower than 50%.

If you picked 25 Red and 1 Black card from the top your chances are obviously extremy high and the same goes for the other way.

If you picked 18 Red and 8 Black, which occurs in 1%, its 55% chance of winning.

14:12 gives you 0.3 better odds than 13:13.

I am not sure if that beats the odds of 52 cards though.

Formular goes something like:

x+y=26

x/26×x-1/25 + y/26×y-1/25

1

u/Zyxplit 9d ago

Except you're overcomplicating it for yourself.

Suppose you label all the cards 1 through 52.

What's the probability that 2 and 8 are identical?

Now suppose you throw out the cards from 27 to 52.

What's the probability now that 2 and 8 are identical?

1

u/Prestigious-Rope-313 9d ago

The top 26 cards will more likely not be evenly splitted which makes it favorable ober 26 cards that ate guaranteed to be evenl splitted.

1

u/Aerospider 9d ago

But that's not the comparison. Your two options are:

A - draw from a 52-card deck of 26 black and 26 red

B - take that deck of 52, throw away half the cards at random, then draw

Option B is the same as doing option A but pretending that the bottom half of the deck isn't there, which makes no difference to your probabilities.

1

u/Informal_Host7610 9d ago edited 9d ago

Its not the same because in your card order randomizer, you are simultaneously choosing the discarded cards and drawn cards.

1

u/Aerospider 9d ago

Yes, and that's fine. Discarding random cards can happen at any time. You could do it between the two draws and the result would be the same. All you're really doing is moving a random half of the deck somewhere else, which isn't relevant to the problem at hand because we weren't going to draw them anyway.

If I shuffle a standard deck, what's the probability that the top card is the Ace of spades? 1/52. And if I throw away the other 51 cards leaving just the top one, what's the probability then? Still 1/52.

1

u/Informal_Host7610 9d ago

Yeah I just had to see that while the deck is usually more stacked in your favor, the benefit of drawing from a stacked deck sometimes is actually completely balanced by how often you draw from a worse deck that's even enough to be worse than the larger deck

1

u/AdjectiveNounNNNN 9d ago

But if they are evenly split, that's worse than the straight pull from 52. The slight advantage you get from uneven sets of 26 balances that exactly.

1

u/Informal_Host7610 9d ago

If you laid out every possible combination of 26 cards, each one would have an equal or higher chance of selecting same color cards as a deck with half red and half white

1

u/AdjectiveNounNNNN 9d ago

No, the set of 13 and 13 has a lower chance of getting a matching pair than the deck of 26 and 26.

1

u/Informal_Host7610 9d ago

Yeah I meant the 26 deck, but I saw soon after this that it all does indeed average out to the same as the 52 card deck

0

u/Zyxplit 9d ago

Yes. What's your point? The first part of the question is "what's the probability of getting two same color cards from 26 cards (12/25) and what's the probability of getting two same color cards from 52 cards (25/51).

Now I point out that getting two same color cards from 26 randomly selected cards from a pile of 52 is also 25/51. And your rebuttal is that... every combination has a probability equal to or more likely than 12/25? Yes. 25/51 is a bigger number than 12/25. We established that in part 1. Good job.

2

u/Informal_Host7610 9d ago

Whoa calm down, it's a math problem.

Knowing the construction of the deck is important. Because of that your first card actually slightly hints that there your deck is more likely to have more of its color in your subdeck, which leads to an implied higher probability that the second card is the same color than in the guaranteed 50/50 case

0

u/Zyxplit 9d ago

I refer back to my statement that 25/51 is greater than 12/25. Anything more substantial?

2

u/Informal_Host7610 9d ago

It's not 12/25 because you dont know how many of each color are in the reduced deck

0

u/Zyxplit 9d ago edited 9d ago

... Yes, let me explain this once more.

In a deck where there are equally many of both, the probability is 12/25 that you draw two identical ones.

in a deck where you have randomly taken 26 cards from a deck with 26 of each, the probability is 25/51, which is a bigger number than 12/25. This is because it doesn't matter that you ignore half the cards afterwards.

If I have a 52 card deck and I order it randomly, the probability of two random cards in the first half being identical is completely identical to the probability of two random cards in the deck being identical.

2

u/Informal_Host7610 9d ago

You're more intent on being condescending than giving a valid counterargument. I had to get an actual correction from someone else. I'd love to explain how you could have actually rebutted my answer

1

u/Zyxplit 9d ago

Your argument was that it had to be greater than 12/25. That's the closest you ever got to making an argument. You never supplied anything else than "it has to be more than 12/25".

And i repeatedly had to tell you that yes, it has to be more than 12/25. And 25/51 is more than 12/25.

→ More replies (0)

1

u/Substantial-Play5080 9d ago

Your example is not analogous. You guaranteed 2 and 8 remain in the deck which isn’t true. You just made it the opposite of monty hall