Quantitative Analyst Interview Questions
Quantitative analyst interview questions shared by candidates
Top Interview Questions
Quantitative Analyst at Morgan Stanley was asked...
What's the best unbiased estimator for a series random variables? 5 AnswersI guess it is just a Gaussian distribution (Normal dist.). Since it has the smallest uncertainty (from quantum point of view) or variance. I guess it is just a Gaussian distribution (Normal dist.), since it has the smallest uncertainty (from quantum point of view) or variance. It is the OLS estimator (with Gauss-Markov approximations and normality), by Fisher's theorem on Maximum Likelihood Estimators. Show More Responses It didn't mention linear. if it's linear, then ols. if not, CEF, conditional expectation function. It didn't mention linear. if it's linear, then ols. if not, CEF, conditional expectation function. |
Quantitative Analyst at Google was asked...
You observe a sample of measurements coming from a fixed length ruler. If the object is shorter than the ruler you observe the actual measurement. Otherwise you observe the length of the ruler. What would be a good estimator of the ruler length? 17 AnswersMy initial answer was to use the MAX of the sample. That however is a biased estimator. How can you account for the bias and come up with an unbiased estimator? I think this is where you need to start making assumptions on the distribution. A uniform distribution would allow to estimate the bias. what kind of distribution is it? what do we do with the data? what precision should we get? what happens if we "lose" the oversize data? I came up a solution: if we know the distribution of actual measurement and the value of actual measurement, then the expected probability of getting wrong measurement should equal to the probability of actual measurement greater than length of ruler. Not sure this is correct and will interview on friday. good luck to me. Show More Responses If we now the distribution... I'd analyse If we now the distribution... I'd analyse the tail of cumulative density function. round(central tendency) * 2 Please ignore my previous two answers above. I misread the question and thought it was a regression problem, when it wasn't. get rid of measurements that are equal to the ruler length. then take the average of the rest of the measurements that are within the range (0, ruler_length), ruler_length is 2 times this average value Assuming that the measurements are on a continuous scale, you would have a lot of mass on the point exactly corresponding to the ruler's length, so you could use something akin to a mode I'd imagine. The mode should work, right? The length of the ruler is likely to be the only specific value that shows up more than once in the data. Should first ask whether we have some prior knowledge about the object length distribution Show More Responses L^{hat} = N/(N+1) * max(X1,X2,X3,...XN) is an unbiased estimator L^{hat} = 2*sum(X)/N is another unbiased estimator The length of the ruler would be the censored value in the data. If you draw the histogram of observed values, there should be a mass on the largest value, which is the length of the ruler. The more observation you have, the better the estimation. I think it should be (N+1)/N * max(X1,..XN). Is there anyone agreeing with me? One or more comments have been removed. |
Quantitative Analyst at Jane Street was asked...
You have 2 decks of cards (each deck contains both red and black cards). One deck has twice the number of cards in the other deck with the same color ration (so one deck has 52 cards and the other has 104, both half red and half black). I offer you to play a game. First you get to chose which deck of cards you want to play with. Second, you draw 2 cards at random from your deck of choice. If both are red, then I will give you a ferarri. Which deck of cards would you chose? 13 AnswersThe unalert interviewee would answer "it doesn't matter, the probability is the same". While this is true for the first card, you have a higher probability of drawing a second red card with the big deck than the smaller one. So I chose the big deck (no homo) and I was right. yes, he would be right Mathematically: (26/52 * 25/51) vs (52/104 * 51/103) 51/206 > 25/102 Show More Responses Actually, the probabilities are the same for each deck. Consider than because you have a 50/50 chance of drawing your first card red, there's a 50% chance the numerator of the next fraction is reduced by one..so your probability is 26/52 * (25/51+26/51)/2 vs 52/104 * (51/103+52/103)/2 which are the same "G" did the right calculation. To calculate the probability of drawing two red cards in a row one needs to set up an equation where the first drawn was red, and the SECOND card was red as well. The question is asking what is the probability of drawing 2 red cards in a row, NOT what is the probability of drawing a red card then either a red or black card. Intuition tells us if you add in same number of red and black cards into the original problem with 52 cards, probability will go up. Just imagine when you add in 1 billion red cards and 1billion black cards You should definitely choose the larger deck if both are 50% red, 50% blue. Here's another explanation in addition to the other correct ones above. Each deck is naturally partitioned into maximal sub-stacks where each sub-stack consists of cards of a single color, either all red or all blue. If it is known ahead of time that half the cards are blue and half are red, then the expected size of the stack increases with the number of cards in the deck. Correction: expected size of the **sub-stacks** increases with the number of cards in the deck. Sorry about that. extreme case deck 1: 1 red 1 black deck 2: 2 red 2 black So more cards the better chance you get... 2 out of 52 is the equivalent of 4 out of 104. For these chances to be equal then the problem should be 2 out of 52 or 4 out of 104. If you still get to draw only two cards to try to get two reds then the chances should be better with the smaller deck. Either one. If you don't like how the table is set, re arrange it. I would offer the dealer half of the reward if he/she let me draw 5 more times in the deck with more cards. It seems that the odds are greater with a lager number of choices. 2:1 ratio. |
Quantitative Analyst at Google was asked...
A coin was flipped 1000 times and there were 560 (not sure if this was the number) heads, do you think the coin is biased? What if it was only flipped 10 times and there were 6 heads? 11 AnswersSample size is good. Use normal distribution for approximation. Sampled mean m=0.56, sample SE = sqrt(n*p*(1-p)/n), theoretical mean = 0.5. Use hypnotises testing to check if 0.56 is okay for 95% confidence level. Standard error in the case of 1000 flips is 560/sqrt(1000)=18 and in in the case with 10 flips it is 1.9. 560 is more than 3 standard deviations away from the null hypothesis of a fair coin (p(560 heads)>0.05). Not sure what Anonymous means by SE = sqrt(n*p*(1-p)/n) = sqrt(p*(1-p))... Show More Responses In case of 6/10, the p-value is 2*P(x>= 6) = 1 - P(x = 5) = 0.246 ( where P is binomial(0.5, 10) ), so unless significance level > 0.246, do not reject 1 sided test should be appropriate here. Use exact probability: p-value is... Probability of seeing data this (or more) extreme given the null hypothesis is true (coin is fair or P(Head)=pH=0.5) P(X>=560|pH=0.5)=1-P(X coin appears biased) 2sided test has same conclusion p-value=0.00017 sorry.. answer above appears cut off? P(X>=560|pH=0.5) =1-P(X<=559|pH=0.5) =8x10^-5 (coin appears biased) Use chi-squared test to determine significance. I think asking for alpha value at first is better. The standard deviation of binomial distribution is sqrt(n*p*(1-p)) = sqrt(1000*.5*.5) = 15.8. The z-score for 560 is (560-500)/15.8 = 3.8. 560 is over 3 standard deviations away from the mean-- < .3 percent chance it is a fair coin). For the second scenario, sd = 10*.5*.5 = 2.5. Z = (6 - 5)/2.5 = .4. It is likely a fair coin. Oops. In my second scenario answer, I forgot to take the square root of the variance to get the standard deviation. The actual standard deviation is sqrt(10*.5*.5) = 1.58. And the correct Z score should be (6-5)/1.58 = .63. N = 1000 K = 560 S = 0 for k = 1:K: S += integration (0.45, 0.55) NCk * p^k * (1-p)^(N-k) dp If S <= 0.05, the coin is unbiased. For the smaller number of samples, it would be hard to conclude. 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...
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 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...
From (0,0,0) to (3,3,3) in 3D space how many paths are there if we move only right, forward or up? 7 Answers144 9! / (3! 3! 3!) Can you explain that please? Show More Responses A dynamic programming solution is applicable here. Considering each decision hop (a point where a decision is made whether to move right/up/forward) is placed unit length apart, the number of decision hops one might encounter in moving from (0,0) to (3,3) is 4 , making it a length=5 path.Also, there are 3 directions of movement corresponding to the 3 dimensions. A 2-Dimensional *dynamic programming based Forward Table* of length 5 along the X-axis (5 steps from (0,0) to (3,3)) and length 3 along the Y-axis (3-directions of movement), can be used to solve the problem. here is a MUCH easier way to think of this, no dynamic programming required: Consider a much simpler problem - you have 2 white books and 2 black books and want to arrange them on a shelf. How many ways can you do this? Basic permutation theory tells us that when you have m distinct groups of n items, the number of ways they can be arranged is given by: n! / (i_1)!(i_2)!...(i_m)! where i_x is the number of items in group x. So, the answer to this problem is 4! / 2!2! = 6. Now, let's return to the original problem: you can ONLY move forward, right, or up. This means you MUST get closer to (3,3,3) each move. It doesn't take a rocket scientist to figure out that this will ALWAYS require 3+3+3 = 9 moves. Now, with these 9 moves, you MUST do 3 moves of each type. Now, using the formula given above you get 9! / 3!3!3! If this was 2 dimensional, ie a square instead of a cube, the answer would be 2. The coordinate of the far corner can be at (1,1), (3,3) or (1000, 1000), there are only two distinct paths to get from (0,0) to the far corner, if we can only move up and right. Same deal for the cube. There are a total of 8 distinct paths. We know there has to be 3 up, 3 forward and 3 right to arrive at the final destination, the only difference is how many combinations are there for up, forward and right. So we choose 3 up from 9 steps, that is C{_9}{^3}, then we choose 3 forward from the following 6 steps, which is C{_6}{^3}, lastly the three steps have to be right, which is C{_3}{^3}. So the total is 1680 paths. |
Quantitative Analyst at Morgan Stanley was asked...
66 handshakes occur at a party how many people at a party if everyone shakes hands with everyone else. 9 AnswersAns 12; 12 *11 =132 132/2 = 66 Solve: 'n'choose'2' =66 n=12 yuuurp... http://brainteaserbible.com/interview-brainteaser-66-handshakes-at-the-party Show More Responses 11 another interesting way of thinking about this one is as a complete graph (where each person is a node, each undirected egde is a handshake). A complete graph has n*(n-1) edges where n is the number of nodes It has to be 11 simple sum formula: 1+2+3+…+(n-2)+(n-1)+n = n(n+1)/2 One or more comments have been removed. |
Quantitative Analyst at Goldman Sachs was asked...
You call the home of a family w/ two children and a kid "billy" answers the phone. What is the probability that both children are boys? What is a virtual constructor in C++? 7 AnswersBasic Bayesian question Pr(#boys = 2) = (1 / 3) No such thing. We are asked what is the Probability that 2 children are Boys, given that the one of them is a Boy? So given that 1 is a Boy, the probablity of the 2nd one being a Boy is 50/50. So the answer is the Prob (both of kids being Boys| given that one is a Boy) = .5 The question is slightly ambiguous and perhaps was phrased in this manner to induce further discussion. See http://en.wikipedia.org/wiki/Boy_or_Girl_paradox. I believe further clarification would be required before an answer of 1/3 or 1/2 could be given Show More Responses 1. 1/2 since it is just a probability of the second one=boy (well, statistics/biology says slightly higher than 1/2 actually) 2. No virtual constructor, but possibly was meant virtual copy constructor. It's 1 in 3. Of the possible combinations of two children, BB, BG, GB and GG, we have eliminated one possibility (GG). Of the three remaining possibilities, one of them is two boys. So the probability is 1/3. It depends on the prior. .25 they try to trick you with the name being predominately a boy name, you have no confirmed Billy's gender in the riddle which is why they refer to Billy as "a kid" not as "a boy" hence all probabilities still remain the same .25 |
See Interview Questions for Similar Jobs
- Analyst
- Software Engineer
- Data Scientist
- Associate
- Quantitative Research Analyst
- Quantitative Researcher
- Business Analyst
- Data Analyst
- Trader
- Intern
- Financial Analyst
- Vice President
- Software Developer
- Senior Software Engineer
- Consultant
- Investment Banking Analyst
- Summer Analyst
- Quantitative Associate
- Strategist