Quantitative analyst Interview Questions | Glassdoor.co.in

# Quantitative analyst Interview Questions

77

quantitative analyst interview questions shared by candidates

## Top Interview Questions

Sort: RelevancePopular Date

13 Dec 2015

### Quantitative Researcher at WorldQuant was asked...

6 Aug 2012
 Minimize the number of comparisons for finding minimum and maximum of a given set of numbers.6 AnswersGiven n numbers, the optimal number of comparison should be 3n/2 Pairwise compare all numbers = n/2 comparisons It is easy to see that the max, min lies among the n/2 elements which are greater, smaller respectively. Pairwise compare the n/2 greater elements = n/4 comparisons. Again pairwise compare the n/4 greater elements obtained in previous step = n/8 comparions. ... You get max(min) in n/4+n/8+...1 = n/2 comparisons. initial comparisons = n/2 comparisons to get max number = n/2 comparisons to get min number = n/2 Total = 3n/2Here is matlab code according to the suggested algorithm : clear; clc; vec=[3,8,7,2,1,6,5,4]; [max12,min12]=max_min(vec(1),vec(2)); [max34,min34]=max_min(vec(3),vec(4)); [max56,min56]=max_min(vec(5),vec(6)); [max78,min78]=max_min(vec(7),vec(8)); [max1234,~]=max_min(max12,max34); [max5678,~]=max_min(max56,max78); [max12345678,~]=max_min(max1234,max5678); fprintf('max=%d\n',max12345678); % Find Min [~,min1234]=max_min(min12,min34); [~,min5678]=max_min(min56,min78); [~,min12345678]=max_min(min1234,min5678); fprintf('min=%d\n',min12345678);More on the above analytic solution: The resulting sequence is geometric with missing first two terms, n + n/2. Sum of a geometric sequence n + n/2 + n/4 + ... + 1 = 2n So for the present sequence: sum = 2n - n - n/2 = n/2 Thus the minimum number of steps required for finding BOTH the minimum and maximum of the set of numeric values is 3n/2. However, to calculate only minimum or maximum, the minimum number of steps would be (n-1) by pairwise comparison.Show more responsesBy the same logic it is n-1 when only maximum or minimum has to be found out from n nos., the correct answer will be n/2 + (n/2-1)+(n/2-1) = 3n/2-2if n is even, 1+3*(n-2)/2=3n/2-2 if n is odd, 3(n-1)/2-2+2=3(n-1)/2Comparison would be less if the range is less with minimum to maximum

### Quantitative Analyst at Goldman Sachs was asked...

26 Dec 2012
 What is the expected number of tosses required to achieve 2 heads in an unbiased coin?5 Answers6 tosses using Markov-techniquesI got 4 as the answer...Expected number of steps required to obtain N consecutive heads by tossing a fair coin is given by En = 2^(n+1) -2 For n = 2 ; E2 = 6 For further details see - http://www.qbyte.org/puzzles/p082s.htmlShow more responsesThe question does not state 2 "consecutive" heads.answer would be 6 if it was 2 consecutive heads, but for 2 heads it is 4.

### Quantitative Analyst at Morgan Stanley was asked...

24 Sep 2012
 Fibonaci Series - By recursion If f(100) takes 1 second, How much will f(101) will take3 Answersfor long numbers f(n+1)~ golden ration f(n)(sqrt(5)+1)/21 + 97/98 sec. f(100) = f (99) + f(98) f(99) = f(98) + f(97) . . . f(3) = f(2) + f(1). Add all these f(100) = sigma(i=1 to 98) f(i) = 1 .....(1) Now, f(101) = f(100) + f(99) Also, by above procedure, f(99) = sigma(i=1 to 97) f(i) = 97/98 by (1) hence total = 1 + 97/98.

### Quantitative Analyst at Morgan Stanley was asked...

24 Sep 2012
 Get uniform distribution of number between 1 and 7 by rolling dice3 Answersroll dice twice-number of possibility 36, assign ever unique set of 5 numbers to one of the number (1,2...7) and repeat the process if you get the 36th sequence(i.e. the unassigned sequence)roll dice 42 times, sum up the results, mod 7, you'll get remainders of 0 to 6, plus 1 and you get a random number generator of 7.Roll 3 dice. Each dice represents a binary digit, where a H =1 and T=0. This our decimal number after 3 rolls = D_1 * 2^0 + D_2 * 2^1 + D_3 * 2^2. If we get TTT, start over. This eliminates 0 from the state space. What we have left is uniform distribution to generate 1->7.

### Quantitative Analyst at Goldman Sachs was asked...

5 Mar 2014
 n people standing in a row with all of them having different heights. Expected position of the tallest guy.2 Answers(n+1)/2The tallest person can either be in the first position, the second position and so on till the nth position. The sample space is Ω={1,2,3,4,…n} Each of these outcomes have equal probability, that is 1/n. Therefore, the expected value is 1/n+2/n+3/n+⋯+n/n This sum evaluates to (n+1)/2.

### Quantitative Analyst at DeepR Analytics was asked...

26 Jan 2019
 Buffon's Needle Problem2 AnswersAnswer available on Mathworld wolfram.can you tell me how did you apply and what was there shortlisting criteria based on resume??

### Quantitative Analyst at J.P. Morgan was asked...

9 Sep 2015
 Describe any one sorting algorithm in detail one puzzle regarding uniform distribution with two players where one players valuation of an item is twice that of others. explain new, delete keywords what is vega of an instrument?2 Answersmerge sort..do it recursivelyIf the game is that 2 players have to guess the closest integer which is the closest to twice the integer picked by the other player then by forward recursion the value picked by both will be the highest possible number (ie infinity if unbounded)

### Quantitative Analyst at Goldman Sachs was asked...

26 Dec 2012
 How do you create an event with a probability of 1/3 using an unbiased coin?2 AnswersToss the unbiased coin thrice. Given the outcome is not both tails ( T T) , then the outcome of both heads (H H) has probability 1/3.unbiased coin has P(H) = P(T) = 1/2. To create the event that the question desires, do follow: first, understand that P(HH) = P(HT) = P(TH) = P(TT) = 1/4 if you flip coin 2 times in a row: 1) HH happens -> do sth 2) HT happens -> do another stuff 3) TH happens -> do other stuff 4) if TT happens -> reroll coin 2 times again and go back . This guarantees that we only observe 1/3 events.

### Quantitative Research at J.P. Morgan was asked...

21 Aug 2018
 How to find a loop in a linked list?1 AnswerUse two pointers a tortoise and a hare...move torotise by 1 and hare by 2. if these two meet somewhere there is a loop in the linked list.
110 of 77 Interview Questions