Crazy D.E. Shaw phone interview question -- Help!

I had a first round phone interview for a quant trader position with D.E. Shaw today, and got stumped on what seems like a pretty simple probability question (see below). Do any of you know how to figure it out? I think it deals with combinations.

There are n socks in a closet, and 3 of them are purple. What is the value of n such that when 2 socks are taken randomly from the drawer, the probability that they are both red is 0.5?

28 Comments
 

Not certain but I think it's n = 11 total (assuming the 8 non-purple ones are all red) - though this answer does not come out with a clean 0.5 probability, the probability for my answer is actually .5090

There's an 8/11 probability of picking a red one on your first grab, and a 7/10 probability of picking a red one on your second draw. = 8/11 * 7/10 = .5090

To find the solution, I used combinations as you suggested with the numerator being: Combination (n - 3, 2) Choose 2 out of the total number of red socks = total socks - purple socks = n - 3 and the denominator being: Combination (n, 2) Choose 2 out of the total number of socks = n

Combin (n - 3, 2) / Combin (n, 2) = approx .5

For my choice of n I just did an iteration of integers upwards from 5 till I got in the ballpark.

Once again, I'm not sure if it's right since it's not exactly .5 but let me know your thoughts.

 

So, like all math questions we need to break it down. Are the variables independent are dependent(you should have asked this), I'm going to guess dependent. You also should have asked are there any other colors.

We are trying to solve for N which is the total number of socks in the closet

So, how many red socks are in the drawer? Well we know that 3 out of N are are purple so N -3 can't be purple.

Thus on the first pick the probility is P(N-3) = (N-3)/N.

Ok, so after the first pick what is remaining? Well, the amount of scoks left would be N -1, because one sock got taken off. The numerator would also have to have one more sock missing N-4 because N-3 -1 = N-4.

Thus on the second pick the probibility is P(N-4| N-3) = (N-4 )/(N-1)

Use the General Rule of Multiplication to solve this problem we have

P( N-3 and N-4) = P(N-3) * P(N-4| N-3) = (N-3)/N * (N-4)/(N-1) = (n^2 -7n +12)/n^2 = (-7n +12)/n^2 = -.5

= -7n+12 = -.5n^2 = .5n^2 - 7n +12 = 0

So, N = aprox 11

lol i made an algebra mistake some where in that long txt

 
blastoisewait that can't be right

Lol... that was impressive however, all the diagnostics/breaking down whatnot.

It's what you put into it
 

You can also think about it another way:

The number of possible dual red combinations assuming only red and purple socks and R as number of red socks- (R)(R-1)/2

The number of total combinations of socks with T as total number of socks should be- (T)(T-1)/2

Since you know that T=R+3 and the probability of dual red is .5, all you need to do is put it together.

((R)(R-1)/2) / ((T)(T-1)/2) = .5 -> (R)(R-1) / (R+3)(R-2) = .5 -> R^2-7n-6=0 -> R~8 T~11

 

Instead of having of having to do the quadratic u could just guess and check. Since .7 squared is.49 u know that the two fractions have to b around there. Obviously the odds of the first sock being red is higher thN the second so were looking for a fraction just larger than 7/10...so u guess 8/11and then it checks out

 
dabanobo
lifeofpurposeif the question is right, then you can't know because you dont know how many red socks there are, just purple

sure, if you want to be pedantic about it. or be a reasonable person and just assume that red = non-purple.

When reading the question, that never even occurred to me, I was thinking the same exact thing as lifeofpupose was.

 
Most Helpful

The answers to date have missed the point completely. If there are k red socks among n socks, the probability of picking two red socks at random is (k/n), the chance of getting a red sock on the first pick, times (k-1)/(n-1), the chance of getting a red sock on the second pick given that you got a red sock on the first pick. So we need to solve k(k-1)/[n(n-1)]=0.5 or n^2 - n - 2k^2 + 2k = 0. The quadratic formula tells us we need 2n - 1= sqrt(8k^2-8k+1), so 8k^2-8k+1 must be an odd perfect square. The first solution is k = n = 1, which is inadmissible since the probability of picking two red socks is undefined, 0/0. The next solution is k = 3, n = 4 which is inadmissible since there can't be three purple socks if there is only one non-red sock. The next solution is k = 15, n = 21, which works. 15 red socks, 3 purple socks and three non-red, non-purple socks. There are also solutions at k = 85, n = 120, and k = 493, n = 697. I suspect you get a pretty good score by setting things up properly and realizing that n = 1 and n = 3 don't work. If you can come up with n = 21 in your head during an interview, that's great, but most people would likely explain how to get the answer with a short computer program or how they would do it by mental trial and error in ten minutes or so. You don't have to try every number since you know k/n has to be near sqrt(.5)+1/(7n).

 

Yes, three purple socks and an unknown number of socks that are neither red nor purple. You may be right about overly complicated, there may be a simpler way to find the answers. But The answer are correct in that they meet both stated conditions: there are three purple socks and if you pick two at random the probability they are both red is 50%.

 

Maxime laboriosam vero occaecati ipsam et. Sit enim ipsa non. Minima necessitatibus deserunt tempora et deleniti modi aut. Debitis molestiae recusandae quos voluptas est ad eum.

Illum consequatur sint blanditiis reiciendis ut cumque vitae. Et ea cupiditate cumque omnis autem voluptatem.

Cum cum qui omnis quasi blanditiis. Voluptatem eos sequi facere aut veniam est. Vel iure ut est magnam omnis commodi.

Animi dolorem dolorum nemo minus numquam nihil. Laboriosam nisi similique quod quidem voluptatem minima impedit. Consequatur aperiam eos voluptatem deleniti rerum voluptatem quibusdam.

 

Asperiores nostrum porro reprehenderit qui sit. Qui vel cumque numquam unde molestiae nostrum. Corporis labore quae explicabo quis molestias. Placeat et fugiat veritatis omnis temporibus sunt illo. Et voluptatem assumenda eveniet quia quaerat nihil.

Autem veniam debitis quis accusamus ut esse esse. In nihil soluta id aliquid porro repellat eos. Eligendi itaque facilis repellendus ut excepturi vel.

Voluptatem non illo incidunt et ea voluptatem. Autem sint et voluptas vero doloribus laborum eos.

Career Advancement Opportunities

May 2026 Hedge Fund

  • Point72 99.0%
  • D.E. Shaw 98.1%
  • Citadel Investment Group 97.1%
  • AQR Capital Management 96.2%
  • Magnetar Capital 95.2%

Overall Employee Satisfaction

May 2026 Hedge Fund

  • Magnetar Capital 99.0%
  • Millennium Partners 98.1%
  • D.E. Shaw 97.1%
  • Blackstone Group 96.1%
  • Citadel Investment Group 95.1%

Professional Growth Opportunities

May 2026 Hedge Fund

  • AQR Capital Management 99.1%
  • Point72 98.1%
  • D.E. Shaw 97.2%
  • Citadel Investment Group 96.2%
  • Magnetar Capital 95.3%

Total Avg Compensation

May 2026 Hedge Fund

  • Portfolio Manager (9) $1,648
  • Vice President (27) $464
  • Director/MD (12) $423
  • NA (9) $320
  • Engineer/Quant (86) $288
  • 3rd+ Year Associate (26) $284
  • Manager (4) $282
  • 2nd Year Associate (32) $253
  • 1st Year Associate (76) $192
  • Analysts (240) $181
  • Intern/Summer Associate (28) $146
  • Junior Trader (5) $102
  • Intern/Summer Analyst (282) $96
notes
16 IB Interviews Notes

“... there’s no excuse to not take advantage of the resources out there available to you. Best value for your $ are the...”

Leaderboard

1
redever's picture
redever
99.2
2
Secyh62's picture
Secyh62
99.0
3
kanon's picture
kanon
99.0
4
BankonBanking's picture
BankonBanking
99.0
5
CompBanker's picture
CompBanker
98.9
6
dosk17's picture
dosk17
98.9
7
GameTheory's picture
GameTheory
98.9
8
Betsy Massar's picture
Betsy Massar
98.9
9
DrApeman's picture
DrApeman
98.9
10
bolo up's picture
bolo up
98.8
success
From 10 rejections to 1 dream investment banking internship

“... I believe it was the single biggest reason why I ended up with an offer...”