Quantitative research analyst Interview Questions
quantitative research analyst interview questions shared by candidates
Top Interview Questions
Quantitative Researcher at Jane Street was asked...
If X, Y and Z are three random variables such that X and Y have a correlation of 0.9, and Y and Z have correlation of 0.8, what are the minimum and maximum correlation that X and Z can have? 8 Answers0.9 http://www.johndcook.com/blog/2010/06/17/covariance-and-law-of-cosines/ 0.98 & 0.46 Show More Responses http://wolfr.am/1i1XT4P How'd you get 0.98 and 0.46? NND correlation matrix --> det(\Sigma)>=0 --> 0.98 and 0.46 minimum: 0.9*0.8+sqrt(1-0.9^2)*sqrt(1-0.8^2) = 0.9815 maximum: 0.9*0.8-sqrt(1-0.9^2)*sqrt(1-0.8^2) = 0.4585 How do you know this |
At a party everyone shakes hands, 66 hand shakes occur, how many people are at the party? 9 Answers12 requires explanation it's not 12, it's 11 Show More Responses 12 sum of the series 66= n/2( 2*1 + (n-1)*1) n=12 You can suppose there are n people in the room and think of them in a row. The first one has to shake hands with (n-1) people (because he doesn't have to shake hands with himself). The second one has already shaken hands with the first one, so he has (n-2) shakes remaining... and so on. So you have to sum: (n-1)+(n-2)+(n-3)+...+1= (n/2)*(n-1) Then you have to solve (n/2)*(n-1)=66 and you get n=12. n(n-1)/2=66 so n=12 You can think of this problem as a combination problem: (N choose 2) = 66, and then solve for N. That is, N! / (2! (N-2)! ) = 66. Simplifying this equation leads to N(N-1)/2 = 66, and the integer solution to this problem is N = 12. 66=x!/((x-2)!*2) which gives 12 |
Quantitative Researcher at Jane Street was asked...
You have two decks of cards: a 52 card deck (26 black, 26 red) and a 26 card deck (13 black, 13 red). You randomly draw two cards and win if both are the same color. Which deck would you prefer? What if the 26 card deck was randomly drawn from the 52 card deck? Which deck would you prefer then? 11 AnswersI responded immediately to the first part. The second part took me a bit longer - I immediately said that my intuition thought the third deck and the first deck were equally good but couldn't give a good rigorous proof very quickly (took about 30 seconds or so). Actually I think the third deck is better than the first deck. That is because it says to "draw two cards of the same color" not "draw two black cards". Compare the following decks: a deck with 13 black and 13 red, a deck with 26 black, and a deck with 26 red. The chance of drawing two of the same color cards are 6/25, 1, 1 respectively. You can see with a little math that any distribution of 26 cards is better than or equally as good as a distribution of 13 red and 13 black cards. Show More Responses @curious_cat I think that only implies that the third deck is better than the second deck (the second has 13/13 while the first has 26/26). 1) P(win | 52-card deck) = 25/51. P(win | even 26-card deck) = 12/25. 52-card deck is better. 2) P(win | n-red cards in random 26-card deck) = (n/26 * ((n-1) / 25)) + ((26-n) / 26 * ((26-n-1) / 25)) = (n^2) / 325 - (2n / 25) + 1. Taking the derivative and solving for the root: P' = 2n / 325 - 2 / 25 = 0 -> n = 13, which is a minimum. Interpretation: having equal numbers of red and black cards in the deck MINIMIZES your chances of winning. Because the last deck is the same as the second deck (26 cards, split evenly red/black) except it may have an uneven number, this last (randomly selected) deck is better than the evely-split deck, but is it better than the 52-card deck? For this, we use the Hypergeometric Distribution (like the Binomial distribution, but for trials without replacement) to look at the odds of getting a 26-card deck with n red cards: P(selecting n red cards for random 26-card deck) = [ (52-26) C (26-n) ] * [ 26 C n ] / [52 C 26] = (2^43 * 3^17 * 5^12 * 7^4 * 11^4 * 13^4 * 17 * 19^2 * 23^2) / (29 * 31 * 37 * 41 * 43 * 47 * (n!)^2 * ((26-n)!)^2). From here, all that's left to do is combine these probabilities with the probability of winning [from above, P(win | n-red cards in deck) = (n^2) / 325 - (2n / 25) + 1] with each deck that contains 0 through 26 red cards (n => {0,26}). If this is larger than 25/51, then we can say definitively that we would prefer the randomly selected 26-card deck to the even 52-card deck. However, doing this out reveals that the probability of winning with the randomly selected deck = 25/51. Therefore, odds of winning are THE SAME with either the first (even 52-card deck) or the last (26-card deck, randomly selected from an even 52-card deck). Imagine, all that math to prove a simple equality! :) Q.E.D. the 3rd deck is the same as the 1st deck we do not need to calculate it by hand P(I randomly pick 2 cards in a 52 deck) = P(I always pick 2 cards on the top of the 52 cards’ deck) = P(You shuffle the deck, then I pick 2 cards on the top) = P(You shuffle the deck, you throw away the bottom half deck, then I pick 2 cards on the top) = P(Picking a 26 cards’ random deck, then I pick 2 cards on the top) = P(Picking a 26 cards’ random deck, then I randomly choose 2 cards in the 26 cards deck) in this logic - even if you only pick a 4 cards' deck randomly from the 52 cards deck for me to choose 2 cards - it's the same probability as if I choose 2 randomly from the 52 cards' deck directly . The 3rd deck is better. Suppose the 3rd deck has k red cards. The probability of getting 2 cards of the same colour is (C(k,2) + C(26-k,2))/C(26,2). It is easy to see that this is minimum for k = 13, which is the first deck. So essentially any random 26 cards is at-least as good as a 13-13 split. Split a blind draw into two draws doesnt change your distribution. These answers are all overkill, the answers are obvious by intuition which are good enough (perhaps even better) for an interview. 1. Obviously deck 1 is better , because taking away your first card has a smaller impact on the ratio of cards left of the same colour. 2. Obviously they're the same. Deck 1 is equivalent to shuffling a deck and taking the top 2 cards, Deck 3 is equivalent to shuffling a deck, taking the top 13 cards of that and then taking the top 2 cards of that. One or more comments have been removed. |
Quantitative Analyst at Morgan Stanley was asked...
Expected number of flipping coins of getting two consecutive faces. 8 Answers6 3 since the question didn't specify two consecutive heads or two consecutive tails. 4 actually Show More Responses 4 is correct. If the question had asked to consecutive H (or T) then the answer would've been 6. I would rather say 2. Consider each possible outcome of 2 consecutive draws : HH, TT, TH, HT so probability of getting 2 consecutive faces is 1/2 and therefore expected time to get 2 consecutive faces is 2. It would have been 4 if we were entitled to get either heads or tails. expected number of coin tosses until 2 consecutive heads. Denote E(2H) = n = expected number of coin tosses until 2 consecutive heads E(2H|1=H) = expected number of coin tosses until 2 consecutive heads if the 1st toss is H E(2H|1=T) = expected number of coin tosses until 2 consecutive heads if the 1st toss is T = E(2H) + 1 //since we’ve already flipped 1 //and we have to start over whenever we get a tail —> E(2H)= n = E(2H|1=H) * P(1=H) + E(2H|1=T)*P(1=T) = (E(2H|1=H,2=H) * P(2=H) + E(2H|1=H,2=T)*P(2=T))*P(1=H) + (n+1)*0.5 = (2 * 0.5 + (n+2)*0.5)*0.5 + (n+1)*0.5 = 1.5 + 0.75n —> n = 6 The mean of a geometric distribution is (1/p) where p is the probability of success for any given trial. Group two tosses as a trial, and the probability to get two consecutive faces is p = (1/4). Hence answer is 4. Your first flip happens, can't get a pair yet. Your next flip has an EV_pairing = .5, and if you miss, your next flip STILL has an EV of .5 for pairing. EV_pairing = 1 after 3 flips. |
Quantitative Trader at Jane Street was asked...
You flip four coins. At least two are tails. What is the probability that exactly three are tails? Do this in your head, you are not allowed to write anything down for this question. 8 Answersprobability you get 3 tails is if you have 1 tail in the remaining 2 coins. This is just one half its 4/11... it'd only be one half if they told you the first two coins were tails. Use bayes rule or actually write out all the possibilities bayes' theorem ftw Show More Responses can you show me the math behind it? i got P(B|A) x P(A) / P(B) = (1x 1/4) / (5/8)=2/5... There are 16 (i.e., 2^4) possible outcomes. There is one way to get zero tails (i.e., HHHH), one way to get all tails (i.e., TTTT), and four ways to get only one tail (i.e., THHH, HTHH, HHTH, and HHHT). All other 10 (=16-6) outcomes have three tails, hence P=10/16. At least two are tails, no HHHH neither THHH, HTHH, HHTH, HHHT. 2^4-5=11 possible scenarios. Three tails, HTTT, THTT, TTHT, TTTH = 4 cases P=4/11 The easy way to work this problem out is that knowing the sample space contains 2 coins (4 choose 2 = 6 ways), 3 coins (4 choose 3 = 4 ways) or 4 coins (4 choose 4 = 1 way). Hence, the probability that there are 2 tails provided the fact is 4 / (6 + 4 + 1) = 4/11. Three tails: 4 At least two tails: 6 (2 tails), 4 (3 tails), 1 (4 tails) 4/11 |
Drawing a pair of (x, y) from a joint Gaussian distribution with 0 covariance. Knowing the stndard deviations of x and y and knowing z = x + y, what is your best guess for x? 10 AnswersZ sigma_x^2/ (sigma_x^2 + sigma_y^2). This is because X and Z are jointly normal and their covariance is equal to the variance of x. Therefore, the correlation coefficient is equal to sigma_x/sigma_z, and as E(X|Z)= rho. (sigma_x/sigma_z). Z, replacing the fact that the variance of the sum is the sum of the variance for independent (normal) R.V.s will give us the answer! z/2. Think about the 2 dimensional graph of joint density of (x, y). The condition x+y = z (here z is fixed) is a vertical plane. The intersection will be proportional to the conditional density. For any curve of such intersection, the highest point has x coordinate z/2. The answer is 0.5 EX - 0.5* EY + 0.5z (EX EY is not equal to zero) Show More Responses Dc [ z * sigma_y^ (-2) ] / [ sigma_x^ (-2) + sigma_y^ (-2) ] From signal processing point of view, x is the signal, y is the noise, and z is the observation. We know X has a prior distribution X ~ N(0, sigma_x^ 2 ), noise Y has distribution Y ~ N(0, sigma_y^ 2 ) and the value Z = z, the questions is what is the MMSE estimate of X given Z, i.e., E(X|Z)? Using Bayesian theorem, or Gauss Markov Theorem, one can show that : E(X|Z) = [ z * sigma_y^ (-2) + 0 * sigma_x^ (-2) ] / [ sigma_x^ (-2) + sigma_y^ (-2) ] Comments: 1. This kind of problems are very common so please keep it in mind in Gaussian case the best estimate of X is a weighted linear combination of maximum likelihood estimate (z in this problem ) and the prior mean (0 in this problem). And the weights are the the inverse of variance. 2. In multi dimension cases where x, y, z are vectors, similar rules also apply. Check Gauss Markov Theorem 3. In tuition here is the larger variance of noise y, the less trust we will assign on ML estimate, which is sigma_y^ (-2) . Correspondingly, the more trust we put on the prior of X. [ z * sigma_y^ (-2) ] / [ sigma_x^ (-2) + sigma_y^ (-2) ] From signal processing point of view, x is the signal, y is the noise, and z is the observation. We know X has a prior distribution X ~ N(0, sigma_x^ 2 ), noise Y has distribution Y ~ N(0, sigma_y^ 2 ) and the value Z = z, the questions is what is the MMSE estimate of X given Z, i.e., E(X|Z)? Using Bayesian theorem, or Gauss Markov Theorem, one can show that : E(X|Z) = [ z * sigma_y^ (-2) + 0 * sigma_x^ (-2) ] / [ sigma_x^ (-2) + sigma_y^ (-2) ] Comments: 1. This kind of problems are very common so please keep it in mind in Gaussian case the best estimate of X is a weighted linear combination of maximum likelihood estimate (z in this problem ) and the prior mean (0 in this problem). And the weights are the the inverse of variance. 2. In multi dimension cases where x, y, z are vectors, similar rules also apply. Check Gauss Markov Theorem 3. In tuition here is the larger variance of noise y, the less trust we will assign on ML estimate, which is sigma_y^ (-2) . Correspondingly, the more trust we put on the prior of X. Z sigma_x^2/ (sigma_x^2 + sigma_y^2), similar to CAPM If you don't know above theorems you can use good old bayes, P(X|Z) = P(Z|X)P(X)/P(Z) and set derivative=0, since you have pdfs of X and Z. But it's really messy and I don't wanna do it. One or more comments have been removed. |
What is the probability of breaking a stick into 3 pieces and forming a triangle? 8 AnswersIts 1/4. Here is the key idea for my analysis of the problem: If we consider the original stick to be of unit length, then we can form a triangle whenever the longest stick is less than a half unit long. Suppose x is the length of the first piece and y is the length of the second piece (both must be nonnegative). Then y will be <= 1-x, and to be able to form a triangle, y must be <= .5 - x with x <= .5. The probability of being able to form a triangle is the area of the second set of (x,y) pairs divided by the area of the first set of (x,y) pairs, which is .125/.5 = .25. The probability is 0 given that it is a question about the probability of 2 breaking points falling on 1st thirdth and 2nd thirdth point. For any continuous variable, the probability of the variable equal to countable points (including indefinite countable numbers) equal to 0 Show More Responses For one time evet, the probability is 0 I think, the probability is 1/2: Breaking a stick into three pieces corresponds to selecting three real positive numbers with a+b+c=1, and, w.l.o.g., a>=b>=c. The triangle inequation, that any two sides are longer than the third one (i.e., a= 0.5, then b+c a, so we cannot form a triangle. - If a 0.5 > a. The other two inequations a+b>c and a+c>b also hold because a>=b>=c: b is positive and so from a>=c we have a+b>c, similarly, as c>0, a+c>b holds. Hence, we can form a triangle iff a<0.5. Ultimately, selecting a number 0 nothing in the question said it had to be equilateral triangle so the probability is 100% 1.a+b>c 2.b+c>a 3.a+c>b A Triangle is formed when all three are true. As there are three pieces, so a>0, b>0 and c> 0 Only possibilities are: 1.T,T,F i.e one is bigger than sum of 2 2. T,T,T I.e all thee equations are valid Favorable possibility is T,T,T So answer = 1/2 = 0.5 try this simulation in R: checkTri c & a+c>b & b+c>a, 1, 0) ) } mean(replicate(100, checkTri())) Theoretically, we have conditions that a+b>1/2, a<1/2, b<1/2. If you can draw this area in an coordinate axis, you can calc the probability. |
Quantitative Analyst at Morgan Stanley was asked...
The price of a stock is $10 now. It has .6 prob. increasing to 12 and .4 prob. going down to 8. Interest rate is 0. What's the value of a call option with strike $10? 8 AnswersFirst compute risk neutral prob. 10.40 Calculate first the risk neutral probability. (I.e you are assuming the current stock price is efficiently priced in) With the stock price tree, risk neutral probability Pi: Its $10 = pi * $12 + (1-pi)*$8 Solving for Pi = 0.5 Then to calculate the value of call: Substitute Pi with the payoffs ($2 = $12 - 10 and $0 as option is worthless at <$10) C(0) = (pi*($2) + (1pi)*$0 )/ r = 0.5 * 2 = $1 (Since r = 1, 0 interest rate) A normal expected value of the option (non risk neutral) will just be 0.6*$2 + (0.4)*$0 = $1.2. Show More Responses $1 Expectation under any measure is equivalent. That's why we change measures to calculate things as the result will be same. Answer is 1 It's easy to get an answer 1.2, but it's wrong. Answer is 1. Can someone explain why the answer is 1 and not 1.2:? Jim, because you get 1.2 with physical probabilities, and 1 with risk neutral probabilities. To use the binomial tree pricing approach you should use the risk neutral probabilities. Th calculations are provided above. |
Quantitative Analyst at Morgan Stanley was asked...
What is the probability of a Brownian motion hit 1 before hitting -2. The Brownian motion starts at 0. 7 Answers2/3 Why ? Let p be the required probability If the first move is to the right(with prob 0.5), it hits 1 If the first move is to the left, then we have to find the prob of hitting 1 before hitting 2, starting from -1, which is equal to (1-p). So p = 0.5 + 0.5*(1-p) p=2/3 Show More Responses what is browian motion?? A martingale approach is easier and more intuitive. Standard Brownian motion is martingale, and with stopping time it is still a martingale. Given a stopping time tao, when it first hits 1 or -2, E[Btao] = B0 = 0 = p*1 + (1-p)*(-2). Therefore, 2/3. let desired probability be p if the first step is 1, then p(-2 reached after 1) = 1 if the first step is -1, then if second stop is -1 , we get to -2 without getting to 1 if the first step is -1, then if second step is 1, we get back to origin hence: p = 0.5*1 + 0.5*0.5*p + 0.5*0.5*0 p = 2/3 a stopped martingale is still a martingale. Ans: 2/3 |
Quantitative Researcher at Jane Street was asked...
Interesting question: From a deck of 52 cards pick 26 at random. From this set of 26 you pick two cards. You win if the both of these cards are of the same color. Is this a game you would prefer over one in which you win by picking two (first two picks) of the same color at random from a deck of 26 with equal number of black and red cards 8 Answersrandom is better Random is not better, both give equal win rates according to simulation. No difference, you can think of the first 26 cards in the shuffled deck as the randomly selected 26 cards, and then you pick the first two. So the winning probability will be exactly the same. Show More Responses First option is slightly better. One way to argue if the 26 random cards are even, then its the same as the 2nd situation, but if its uneven (12R 14B), then probability is 12/26 * 11/25 + 14/26 * 13/25 > the probability of the 2nd option. And the probability just gets better as the draw is more skewed. Another way to argue is the 1st option is picking from a deck of 52 even cards, and 2nd option is picking from 26. First option probability is 25/51, second option is 12/25. As u choose from more and more cards, the probability increases and tends towards 1/2. Intuitive Solution. 26 is an arbitrary selection. For a two card case: Case 2: deck of two cards. 1 black and 1 white card gives P = 0. Case 1: pick two cards from 52. P > 0. Random is better. Here is the solution: For latter game(fixed 26 cards with equal red and black), the probability to win is: p2=1-13*13/C(2,26)=0.48. (1-probability of picking two different color cards) For the random game, although the expectations of number of red card and black card are equal, but they may not be the exactly same. Assume R is the number of red cards, and B is the number of black cards. with constraints: R+B=26 then the probability to win for this game becomes: p1=1-R*B/C(2,26) With the constraints R+B=26, then R*B = p2 always. fix is better, since in random case more colors are mixed in. The prob of hitting same color pair got lowered. Keep in mind a deck of cards is composed of 4 colors and each of 13 cards. So that 12+14 is not happening. oops I got this wrong. random is better. 12+14 is happening. We are talking about colors... |
See Interview Questions for Similar Jobs
- Quantitative Analyst
- Quantitative Research Analyst
- Software Engineer
- Trader
- Analyst
- Associate
- Data Scientist
- Software Developer
- Quantitative Trader
- Intern
- Senior Software Engineer
- Vice President
- Data Analyst
- Research Analyst
- Quant
- Junior Trader
- Research Scientist
- Quantitative Developer