# Quant Interview Questions

Quant interview questions shared by candidates

## Top Interview Questions

### Quant at Jane Street was asked...

suppose you have a perfectly round disk. You put three legs randomly on this disk to form a table. Supposing the legs are perfectly perpendicular to the disk and are attached to the disk firmly, what is chance that the table will not fall when you flip the disk or in other word when you put the table to stand on its legs? 26 Answers3/4? 2/9 1/4 Show More Responses I got 1/4th, can you guys post how you got your answers? 1/4 is correct 1/2, if three legs cover > 180 degrees, the table can stand. heres what I did. I cut the circle into quarters and then said that the table will not stand if all 3 legs are in the same half of the circle. there is (1/2)^3 odds of putting all 3 legs in the same half, and 4 different halfs (top half, bottom half, left half, and right half) for this to happen. --> 1 - 4 * (1/2)^3 = 1/2 anyone see a problem with this? I don't really understand why you said there are 4 different halfs. You could have have cut the circle up into eights and then there are 8 halfs. You could have cut the circle up into 10000ths and then argued that there are 10000 halfs. The way I think you are supposed to do it is this. Place the first leg, it doesn't matter where you place it. Now, what is the chance that the 2nd and third leg are on the same half as the first leg. So, it's 2C2 * (1/2)^2 = 1/4. Chance of this not happening = 3/4. What am I missing? I think its 1/2 also. Same reasoning as the comment above, but I think the 1st AND 2nd leg can be anywhere, because there is no established "half" until there are 2 legs on the table. The only place the 2nd leg cant be is exactly 180 degrees away from the 1st (the probability of which is about 0, because 179.9 degrees in either direction is already fine). So the probabilty of all 3 legs being on the same half is 1 x 1 x 1/2 Why not think the opposite from the beginning? What is the probability that it could not stand? It means that the legs are in the same half circle. 3*(1/2)*(1/2) = 3/4 Then the answer is 1/4 Brett, why are you multiplying by 3...the odds that the three are on the same side is as follows 1 peg can go anywhere. 50% chance that the next peg is on the same side and another 50% chance that the 3rd peg is on the same side therefore shouldn't it be (1/2)*(1/2) = 1/4 chance that the table falls (aka all pegs on the same side) and there fore probability that the table stands is 1-1/4 = 3/4 so isn't 3/4 your final answer n/360, where n is the angle of the 2 legs Ok, here is mine, the first one is always not a problem, so let's jump to the 2nd stand In order to drop, the second must lie inside the half circle with the 1st one so, however, if you think of that in the clockwise and anti clockwise location, you will immediately discover that where ever it is, the 2nd is some how within the 180degree ranges. So, the problem leads to the third stand. So, if you can see the big picture, it is not hard to realized that there is only one safe zone for the 3rd stand, which is the opposite region of the one between 1st and 2nd (say 2nd located at n), so, the probability of it being dropped will be n/360 if using only integers => 1- n/360 being the right answer (to me). And if you sum up all the probabilities and combination, you will soon see that 1/2 is the right answer. Hope it can help! Show More Responses Sorry, it is 3/4 It's 1/2. 1/pi * integral from 0 to pi (x/pi) Fix a leg. Join this point to the opposite side of the disk to split the circle into half. If both legs lie in the same half it will topple. Effectively what is the probability of two coins the same in two tosses. We have HH,HT,TH,TT so 1/2. It will stand 1/2 of the time. The answer is 1/4. The answer is not 1/2. It's not 1/2, and it's not 1/4. Salalah had it right. Draw a circle. Draw the epicenter. Draw your first random leg (any point). Draw a line from it, through the epicenter, and to the circumference (your line will be longer than the radius). Draw a second leg (any point). Draw a line from it, through the epicenter, to the circumference. Your third leg needs to fall in the resulting pie piece. The probability of it falling there will be the the angle from point 1 to the epicenter to point 2, divided by 360 degrees. I believe it is the same with cutting the circle 3 times and probability that all of the pieces are smaller than 0.5* circumference because in my opinion, table will stand if the center of mass is inside of the triangle made by three cut. If one of the pieces is bigger than the 0.5, then the triangle could not capture the center so the answer is 1/4. 1/4. here is how to get the answer mathematically: angles between every two legs: x,y,z then x+y+z=2pi and restrictions are 0 I got 1/4 https://answers.yahoo.com/question/index?qid=20110714233431AA3yVDg 1. Let the center be O 2. The 1st leg is at A --> AO cuts the circle at A1 and A2, with A1 being on the other side of A w.r.t O 3. The 2nd leg is at B --> BO cuts the circle at B1 and B2, with B1 being on the other side of B w.r.t O 4. The 3rd leg is at C. In order that the table doesn't fall, C has to be in the pie OA1B1 5. Let the angle AOB be phi 6. The probability that the table doesn't fall is phi / 2pi 7. Since A and B are uniformly distributed within the circle, the expected value of phi is \int_{0}^{pi} phi * dphi = pi^2 / 2 8. --> the probability that the table doesn't fall is : pi^2 / 2 / 2pi = pi / 4 Am I wrong any where ? Show More Responses point 7 is not clear. The sector/pie in some of the above solutions is right but there is a bit more to it. The point A can be anywhere on a radius. Placement of the first peg will establish a radius. Also it will not matter where on this radius the first peg is. It could be close to centre or near the circumference. The second peg can lie anywhere in a tiny sector projecting angle of dtheta say. So with the first point A being anywhere on its radius and B anywhere in the sector, the third leg must fall in the sector of angle theta on other side of the circle . so the probability for B is 1/2*(r^2)*dtheta/pi*r^2 and for C is (1/pi)*sin*cos so take the integral of this will give 1/(2*pi^2) The answer is 1/4. Place one leg on the unit circle and define this point as phi = 0. Then place the next leg on the unit circle. Note the position of placement is uniformly distributed from 0 to 2pi. Now consider if the second leg is placed at a position x (x radian away from the first leg), draw a diagram and notice that for stability, draw two straight lines from each leg and going through the centre. The third leg must be placed in the region opposite of the other 2 legs, so that the three legs make a triangle which contains the centre of mass of the table. So if xpi, stability probability = (2pi - x)/2pi We need to sum over all possible values of x (0 to 2pi) and not forget normalisation (in this case 1/2pi) So probability of stability = (1/2pi)*[( integral of x/2pi from 0 to pi) + (integral of (2pi-x)/2pi) from pi to 2pi)] = 1/4 Suppose 1st leg placed at A and 2nd at B. Draw a diameter through A. If the 3rd leg is placed on same side of diameter as B (prob = 0.5) it falls. Else it does not fall (prob = 1-0.5=0.5). Answer: 0.5. |

Suppose you have two covariance matrices A and B. Is AB also a covariance matrix? Suppose that, by plain dumb luck, we also have that AB=BA. Is AB a covariance matrix under this additional condition? 12 AnswersI suppose it's clear from how I wrote the question that the answer to the first question is no (for you: why?). For the second question, this is a little bit harder if you aren't experienced in linear algebra. I actually have a PhD in algebra, and the interviewer also had a PhD in algebra, so on some level this question might have been specifically targeting my background. There is a standard result that applies here; see if you can figure it out. 1. no 2. no, give an example where diagonal positivity is not true. 1 is correct, 2 is wrong. Try again. :) Show More Responses 2. Just checked Wikipedia, AB is cov matrix because it is symmetric semi positive definite. Is it right? If AB=BA then yes it is symmetric. So the question boils down to: Is it in fact positive semi-definite? Why or why not? Work through that and you have your answer. My hint: Take a look at some results related to diagonalizing matrices that commute with each other. Hi for your telephone interview with doug, what was the focus for technical interview parts, everything from math, finance, programming? or mainly probability type of question? thanks I remember it being mostly probability and finance. Nothing too terrible. Hi Mr.interview candidate, what were the types of finance questions Doug asked? Thanks! Hi, Mr. interview. Do you remember what kind of data analysis example was for on-site interview? If so, can you share a little bit? What was the level of difficulty? Thanks! 1, no 2, yes How does the first one not contradict this: https://math.stackexchange.com/questions/982797/prove-that-the-product-of-two-positive-semidefinite-and-symmetric-matrices-has-n It doesn’t. It provides an alternative way of establishing that the eigenvalues must be nonnegative. In fact, if you read the proof, all that’s established is that AB is similar to a positive semidefinite matrix and therefore must be positive semidefinite. It says nothing about whether or not AB is symmetric (which is also required for AB to be a covariance matrix). |

### Quant Internship at Jane Street was asked...

You have 100 marbles, 50 are blue, 50 are red. You want to distribute them between two drawers, in such a way that none is left outside and no drawer is left empty. After distributing them you are gonna select a drawer randomly and from that drawer you are gonna remove one marble randomly. How do you distribute the marbles in such a way that the probability of getting a red marble is maximized? 6 AnswersPut one red marble in one drawer and all the others in the other drawer. It doesn't matter how you distribute the marbles. The fact that they are split into two drawers doesn't affect the sample space. The probability of choosing either draw is 1/2 (i.e. the same). The first answer is correct. Say you put one red marble in drawer 1, and drawer 2 has 24 red and 25 blue. The chances of choosing drawer 1 and a red marble are .5 or 49/98 since all the marbles are red in drawer 1. The chances of choosing drawer 2 and a red marble are .5*(24/49) so 12/49 or 24/98. The total chances of choosing a red marble in this case are 73/98, much higher than 1/2. Show More Responses In drawer #1: 1 RED 0 BLUE In drawer #2: 49 RED 50 BLUE 50% chance of selecting drawer #1 - where there is a 100% chance of selecting RED = .5 * 1.00 = .5 50% chance of selecting drawer #2 - where there is a 49/99 or .4949% chance of selecting RED = .5 * .4949 = .2474 .5 + .2474 = .7475 Stephen is correct. The answer is indeed 1/2*(1/1) + 1/2*(49/99) = 1/2*(148/99) = 74/99 = 74.75%. "P" has the right approach but has assumed the wrong number of marbles, as there should be 100 marbles in total, not 50 :) Here's a really intuitive way to see derive the solution without any actual math. You can obviously achieve 50% odds by putting all the red marbles in one drawer and all the blue marbles in the other. If you were to take a blue marble from the blue drawer and put it into the red drawer, then you slightly decrease the odds overall. Conversely, if you were to take a red marble from the red drawer and put it into the blue drawer, then you slightly *increase* the odds overall, since if you pick the red drawer you still have a 100% chance (at that point) of getting a red marble, and if you pick the blue drawer you now have a nonzero chance of getting a red marble. Repeating this, we arrive at the optimal solution posted by others: one drawer should contain one marble while the other drawer should contain all other marbles. |

### Quant at Jane Street was asked...

find a subset of {1,2,3,...,30} so that numbers in that subset is coprime to each other. 6 Answers2,3,5,7,11,13,17,19,23,29 MMXMV, you forgot about 1: 1 is coprime to all intergers Should be 1,2,3,5,7,11,13,17,19,23,29 I believe this question was supposed to be "find a subset such that the sum is the greatest" so the answer would be 1,2,7,11,13,17,19,23,25,27,29 Show More Responses sorry, delete 2 add 16 woops, take out 16 and 7 and add 28! since 16+7 < 28 1 11 13 17 19 23 25 27 28 29 Here is the steps: Start from list of primes and 1 1 2 3 5 7 11 13 17 19 23 29 Now from the left switch out to increase sum. 28 in, 2 and 7 out 1 3 5 11 13 17 19 23 29 27 in, 3 out 1 5 11 13 17 19 23 27 29 25 in, 5 out 1 11 13 17 19 23 25 27 29 23 already in. 21 < 28. 15 < 25. Can stop here. |

### Quant at Jane Street was asked...

suppose you live in middle town, your mom lives in downtown while your girl friend lives in uptown. You take subway to have dinner with either your mom or your girl friend every night. You always the first train that arrives at the station. why do you end up with have dinner with your girl friend 90% of the times? assume the uptown and downtown train run at the same intervals. 6 AnswersThis would happen if suppose the downtown train always arrives slightly after the uptown. Suppose they each arrive in 10 minute intervals. Suppose the uptown arrives at 6:00, 6:10, 6:20, etc, and the downtown arrives at 6:01, 6:11, 6:21, etc. Then supposing you arrive at a random time (uniformly distributed), it is highly you arrive before an uptown train rather than before a downtown. And there is one more reason because boys will always prefer to stay with their girl friends than their mum. The downtown train should arrive six minutes after the uptwon train to visit mom 10% of the time. Show More Responses if the trains arrive once an hour i would see the girlfriend 100% of the times Assuming the interval is X minutes. If uptown train arrive at t, t+X, t+2X...., the downtown train should arrive at t+0.1X, t+X+0.1X,.... |

Suppose you have 100 GB of data that you want to sort, but you only have 1 GB of memory. How would you sort this data? 8 AnswersHint: This isn't really a difficult question (just was an unexpected one for me). You don't really need to know the answer to figure this out. As it turns out, the obvious thing actually works here (and it is a known sorting algorithm). Can you expand on this? What is sorting algorithm? Sorting algorithm = a computer algorithm to sort a list of objects. Well pretend you just have 2 GB of data (for simplicity, assume they are integers) and 1 GB of memory, since the technique is the same. And pretend you want to sort these integers in increasing order. What would you do? Like, what's the first idea that comes to your mind? Show More Responses You do an on disk merge sort, bring chunks in to memory and sort using quick sort, then had the sorted data in to buckets (files). When your done merge them using a merge sort. Yep, exactly. External sort bucket sort. Sort each bucket, then merge. Mark |

### Quant at Jane Street was asked...

Unfair coin with P(H) = 1/3 and P(T) = 2/3. a) How to make an event with 50% probability? b) Expected number of flips until a realization occurs? c) Can you create a strategy to reduce the number of flips necessary? d) Can you create a strategy to reduce the number of flips necessary for an unfair coin with any bias? 7 Answersa) Event 1 = {T,H}, Event 2 = {H,T}, if any other outcome, then re-roll b) The probability of Event 1 or Event 2 occurring is 1/9+1/9=2/9. The expected number of 2-roll "tries" is 9/2. And each "try" consists of two rolls so 9 expected rolls for a realization. c) Event 1 = {T,T}, Event 2 = any other combination. Probability of either event is 4/9. d) Many solutions. Trick is to not discard any rolls. Use strategy from part (a), but if you roll {T,T}, then continue and put {T,T,H,H} in Event 1 and {H,H,T,T} in Event 2. the c) is wrong. probability of event 2 is 5/9 not 4/9 mokhlos is right. Discard HH. Show More Responses Interview Candidate, P(H) = 1/3 and P(T) = 2/3 so a H-T combo will have a 2/9 prob. For a), the probability of Event 1 or Event 2 occurring is 2/9 + 2/9 = 4/9. Therefore, the expected number of 2-roll "tries" is 9/4. Each try consists of two rolls - so an expected 9/2 rolls until a realization. best answer: TT is counted as case 1 -> p = 4/9 TH or HT is case 2 -> p = 2/9 + 2/9 = 4/9 only discard HH Expected # of flips E = 8/9*2 + 1/9*(2 + E) -> E = 9/4 or 2.25 flips What is the best (minimum number of expected tosses) possible for any strategy ? Using Information Theory, Expected number of coin-tosses required is at least (1/ H(1/3))=1.08 |

### Quant at Jane Street was asked...

estimate how many gallons of gas are consumed in US per week 5 AnswersIn general how are we supposed to answer a question like this? Thanks!! one approach could be by factorizing the number interest into its components: #gallon=#households x #cars per household x #gallons per week per car In addition you can do the same for public xportation and other gas consumer systems this sounds like a consulting question. how i'd answer it: my household has 3 cars for 3 people. that's atypical i know, but using my knowledge i believe there might be one car and a half per household. given there's, on average, 3 people per household, and the population in australia is 21mil, there's 7 million households, and 7*1.5 cars. again, my car has really good efficiency coz it's very small, but my dad drives an suv. based off my knowledge, my dad car does about 10.2litres/100km (according to the indicator) and mine does 7.5, so i'll just say about 8.5 (or wathever). then blah blah i live in aus so we use metric Show More Responses Here is my answer, first, we have to eliminate the factors of affecting the usage of gas. Factors:weather, efficients of usage, number of population, habits Things that are using gas in normal US region: cars? Cooking, heater, electricity, factories. Ok, let's assume we are in the winter, so more gas will be used than summer to increase the difficulty^^ first of all, domestic users will differently use more gas than it does at summer, To cook, to warm, and to drive with heater on. And it also vary with places, for example atlantic is different using more than Forida.... In order to estimate, we need to do another estimate about number of population in the different states. Let's separate the US into north and south(different weather). It is obvious that north have more population than the south, so I believe that 70% of population is living in the north which gives 300m*70%=210m. And 90m in the rest of the state. (too long to be finished, will leave it here and will be finished when free) what matters is that you are not order of magnitude off from the answer. 300m ppl in the US, a car for every 2 or 3 sounds reasonable --> 100m cars a car fills its tank of 20 gallons 1 or 2 times a week --> 30 gallons a week so approximately 3b gallons a week |

### Quant at Renaissance Technologies LLC was asked...

how fast can you find the max in a sorted list of numbers 4 AnswersO(1). The answer is simply max(List(0), List(-1)) in python notation. Because it is a sorted list, the maximum has to be either the first or last element. O(1) is correct if we assume a random access model where we can access each address in memory in constant time. The answer isn't as simple as others are saying. Notice that the question refers to a list of numbers, not an array. Finding the max of a list depends on whether the it is sorted in increasing or decreasing order. In the case it is decreasing it takes O(1) time; just get the first element. Otherwise you know the max is the last element in the list. Getting to the last element requires iterating over each element. O(n) time. Show More Responses I think there are a couple things that you don't know here. First, even if the list is ordered, you don't know the metric. It could go as the square, in which case you would be O(n). Since this is unlikely, the other thing that could be amiss is where the list really starts. Just because order has been forced upon a set of numbers, that doesn't mean you know where the minimum is. 1, 2, 3, 4, 5 and 3, 4, 5, 1, 2 are also ordered if you don't mind looping around. In that case I think you're at O(log(n)). Finally, if you know that the list starts with the max or min, then you get O(1). |

### Quant Research at State Street was asked...

what is the influence to R square when more independent variables are added to the regression model 3 Answershaving more covariates will in general give a better fit, however, this does not necessarily mean a better model (e.g., in terms of generalization). Thus, model comparison is carried out at the end in terms of (1) how the model explains the data (e.g., likelihood, R2, etc), and (2) how simple the model is (i.e., Occam's razor) One could get a better R squared for having more variables, but that potentially induces overfitting for the sample of data you are looking at. One can look at BIC where the model selection criterion is penalized by having too many variables. Additional variables may improve R^2 but may lead to multicollinearity |

## See Interview Questions for Similar Jobs

- Quantitative Analyst
- Quantitative Researcher
- Software Engineer
- Trader
- Analyst
- Quantitative Research Analyst
- Intern
- Data Scientist
- Quantitative Trader
- Associate
- Software Developer
- Strategist
- Vice President
- Quantitative Associate
- Summer Analyst
- Senior Software Engineer
- Data Analyst
- Financial Analyst