Quantitative Interview questions and answers

1. Find \(x\) if \(x^{x^{x^{\ldots}}}=2\)
6. Calculate \(\sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\ldots}}}} \)
I haven't seen this one solved the 'easy' way yet. Someone used logarithms, but that's messy.

Let \[ x\;=\;\sqrt{2+\sqrt{2+\sqrt{2+...}}} \]
\[ x^2=\;2+\sqrt{2+\sqrt{2+\sqrt{2+...}}} \]
\[ x^2=2+x \]
\[ x^2-x+2=0 \]
\[ (x-2)(x+1)=0 \]
\[ x=2 , x=-1 \] common sense check, negative radicals raises a flag. Negative 1 does not make sense.
Answer: 2
For any value k in \[ \sqrt{k+\sqrt{k+\sqrt{k+...}}} \]
the general solution is \[ \frac{1+\sqrt{1+4k}}2 \]
 
Last edited:
Question: Randomly picking two points on the surface of a sphere, what is the probability that their straight-line distance is greater than the sphere's radius?
 
Last edited:
1. (BOfA, ML) There are a cup of milk and a cup of water. Take one teaspoon of milk,
put into the water cup; mix well. Take one teaspoon of the mixture in the water cup and put into the milk cup then mix well.
Which is higher: the percentage of water in the milk cup or the percentage of milk in the water cup ?

2. (Barclays, ML) \(W_t\) is brownian motion. N is cdf of normal \(N(0,1)\). Calculate \(E(N(W_t))\).

3. (GS) There are 5 thieves numbered 1,..,5 trying to divide 100 gold coins using this algorithm: the number 1 will come up with a way to divide money, if there is more than 50% agreement among them about his method (including the dividing thief) then it's done. If not, then they will kill the first thief and the second thief will divide money coming up with his own method. If you are the first one, what method you will use to divide money ?

4. (SG) There is a cubic cheese 3x3x3. There is a rat eating this cheese in the following manner: it east a corner (1x1x1) of the cubic the first day. The next day, it will eat another 1x1x1 cell which has the same outer face as the one it eats the day before. Find an algorithm so that the rate can eat the center cell the last day.

5. (ML, LB, SG, Bear, DB) The today price of a certain stock is 20$. Here is an option: if the stock reaches 40$ then the payoff is 1$. Price this option.

6. (SG) \(t < T\). W is brownian motion. Calculate \(E(W_T|W_t), E(W_t|W_T), E(W_t| |W_T| )\) (\(W_t\) conditioning to the absolute value of \(W_T\))

7. (JPM) There are parallel lines with distance d lying on the same 2-D plane. There is a line segment with length l>d. Find probability that this line segment not crossing any other lines.

8. (ML) \(T_1 < T_2\). Pricing forward-start option \(E(\frac{S_{T_2}}{S_{T_1}}-K)^{+}\)

Any Hints for
Wt is brownian motion. N is cdf of normal N(0,1). Calculate E(N(Wt)).

Ito's lemma? mgf ?
 
3. (GS) There are 5 thieves numbered 1,..,5 trying to divide 100 gold coins using this algorithm: the number 1 will come up with a way to divide money, if there is more than 50% agreement among them about his method (including the dividing thief) then it's done. If not, then they will kill the first thief and the second thief will divide money coming up with his own method. If you are the first one, what method you will use to divide money ?

I believe when faced with this type of problem it is okay to make assumptions(logical ones) and explain them out loud.
Assumption 1: The thieves value their life more than any amount of gold
Assumption 2: Thieves will only vote 'no' in favor of a death if they gain a monetary advantage, (they are thieves, not murderous sociopaths)
Assumption 3: Thieves will always try to maximize their booty, and know that the other's will try to as well.

Backward processing allows for the application of these assumptions cleanly. So we start with the last 2 thieves.

Round 4: 4 & 5 are left, then 4 will split it 0-100 as to save his life.
Round 3: 3,4&5 are left: then 3 will split it 99-1-0, as to get 4's vote as he gets a better deal than round 4.
Round 2: 2,3,4&5 are left: then 2 needs to get 2 other votes. By splitting it 98-0-1-1, 4&5 each get an equal or better deal than round 3
Round 1: All are left: Then 1 needs 2 other votes. Splitting it 98-0-1-1-0, 3&4 get better or equal deals than round 2.

My answer: 98-0-1-1-0
 
Any Hints for
Wt is brownian motion. N is cdf of normal N(0,1). Calculate E(N(Wt)).

Ito's lemma? mgf ?
Well One simple way is Ito lemma the expectation of the martingale term is zero and the second derivative of N is an odd function since $W$ is symmetric the expectation of the bounded variation term in Ito lemma is also equale to zero so you your final result will be $N(a)$ if W start at a.
 
Well One simple way is Ito lemma the expectation of the martingale term is zero and the second derivative of N is an odd function since $W$ is symmetric the expectation of the bounded variation term in Ito lemma is also equale to zero so you your final result will be $N(a)$ if W start at a.
@ Kalai Thank you for the reply.
 
Question: A man behind a curtain roles his first die (D1), then roles a second (D2). He tells you that the second roll was higher than his first (D2>D1). What is the probability that if you roll a 3rd die, it is higher than his second die (D3>D2)? More simply, find P(D3>D2 | D2>D1), assuming all rolls are with fair 6 sided dice.
 
Well if I don't miss nothing you need to compute first P(D3>D2>D1)=(1\6)*P(the value are different)(Symmetries)=(1\6)*(5\6)*(4\6). You need on the other hand to compute P(D2>D1)=1\2P(D2 diff from D1)=1\2*5\6. and then Bays rule.
 
I think questions like these are something which you can work on too:

Q. What is the singles digit for 2^230?

Answer:

Quickly look at the last digit of 2^n,
for n=1, 2, 3, and so on.
We only need to know the last digits of numbers. We get the units place of the multiplication table of 2 as 2, 4, 8, 6, 2, 4,.......
Thus the unitsplace is periodic and returns back after 4 numbers.

Thus 2^(320) =(2^4) 80

Thus, the units place for the number is 6
as 2^0 = 1
2^1 = 2
2^2 = 4
2^3 = 8
2^4 = 16
 
I believe when faced with this type of problem it is okay to make assumptions(logical ones) and explain them out loud.
Assumption 1: The thieves value their life more than any amount of gold
Assumption 2: Thieves will only vote 'no' in favor of a death if they gain a monetary advantage, (they are thieves, not murderous sociopaths)
Assumption 3: Thieves will always try to maximize their booty, and know that the other's will try to as well.

Backward processing allows for the application of these assumptions cleanly. So we start with the last 2 thieves.

Round 4: 4 & 5 are left, then 4 will split it 0-100 as to save his life.
Round 3: 3,4&5 are left: then 3 will split it 99-1-0, as to get 4's vote as he gets a better deal than round 4.
Round 2: 2,3,4&5 are left: then 2 needs to get 2 other votes. By splitting it 98-0-1-1, 4&5 each get an equal or better deal than round 3
Round 1: All are left: Then 1 needs 2 other votes. Splitting it 98-0-1-1-0, 3&4 get better or equal deals than round 2.

My answer: 98-0-1-1-0

Should be 98-0-1-0-1, IF pirates would vote for a death, all other things being equal, otherwise first pirate can keep everything
Naming the pirates 1-2-3-4-5

Two pirates left, Pirate 4 gives himself all the gold, can ensure 50% agreement by voting for it himself 100-0
Three pirates left, Pirate 3 gives pirate 5 1 gold, ensuring his vote because it's a more favorable outcome for him than what would happen with two pirates left, gets 2 out of 3 votes. 99-0-1
Four pirates left, Pirate 2 gives pirate 4 1 gold, ensuring his vote. 99-0-1-0
Five pirates left, Pirate 1 gives pirates 3 and 5 1 gold each, ensuring their vote. 98-0-1-0-1

Round 4: 4 & 5 are left, then 4 will split it 0-100 as to save his life.

Doesn't need to, as he can vote for it himself and clinch the tie.
 
Question: A man behind a curtain roles his first die (D1), then roles a second (D2). He tells you that the second roll was higher than his first (D2>D1). What is the probability that if you roll a 3rd die, it is higher than his second die (D3>D2)? More simply, find P(D3>D2 | D2>D1), assuming all rolls are with fair 6 sided dice.

Seems pretty straight forward. First, compute the probability of what D2 is, given that D2 is higher than D1. 36 possibilities of the outcome of two rolls, D2 is higher in 15 of them.

5 outcomes: D2 = 6; 4 outcomes: D2 = 5; 3 outcomes: D2 = 4; 2 outcomes: D2 = 3; 1 outcome: D2 = 2

Therefore there's 5/15 chance D2 = 6, 4/15 D2 is 5, and so on

Multiply by the respective probabilities that D3 is higher....

(5/15)(0/6)+(4/15)(1/6)+(3/15)(2/6)+(2/15)(3/6)+(1/15)(4/6)

and the answer is 20/90 or 2/9, if I did my math right.
 
What do you guys think about this one?
You are standing in a vast, flat desert on a moonless night. It is foggy, overcast, and raining hard. You are one mile from the only road, which is perfectly straight and infinitely long in both directions. You can’t see the road until you are right on top of it. What is your strategy for finding the road with minimum hiking in the worst case?
 
What do you guys think about this one?

I would imagine a circle around my original location with a mile long radius. Walk in any direction to the circumference, and then walk along the circumference until I hit the road.

Wouldn't be surprised if there is a more efficient way though.
 
I would imagine a circle around my original location with a mile long radius. Walk in any direction to the circumference, and then walk along the circumference until I hit the road.

Wouldn't be surprised if there is a more efficient way though.
Given that it is moonless, foggy, overcast and raining hard, how could you be sure you were walking along the circumference? Footprints may not be visible and if they are they may get rained away.

Also how can you judge a 1 mile radius from your current position? If you accidentally judged 0.99 miles, you would not hit the road. Spiraling outward from your starting position might fix this but still the original vision problems might exist
 
From the initial list, for question 20, I've made a video recently about it (including both a simpler case solution and the generalized one) :)
 
Another interesting question i've found online..

You are taking out candies one by one from a jar that has 10 red candies, 20 blue candies, and 30 green candies in it. What is the probability that there are at least 1 blue candy and 1 green candy left in the jar when you have taken out all the red candies? (Candies of same color are indistinguishable!)

P.S. It doesn't require much calculation
bit late to the party but I think there are nicer answers than those given. You can, for example, consider that all 60 candies are drawn out one at a time, condition now on the last candy being green (P = 1/2) or blue (P= 1/3). If say the last is green then we just need the last bleu to be below the last red, so ignore the other 29 green, the probability this happens is clearly 2/3. Similarly, swapping the roles of blue and green, it's 3/4.

So it's just 1/2 * 2/3 + 1/3 * 3/4 = 7/12
 
It turns out that I was wrong...about being wrong. The MC simulation was the part that wasn't correct; my original reasoning was fine. The answer to this one is in fact \(\frac{3}{4}\).

We pick the first point at random, but it's really arbitrary. We can always rotate the circle and make \(\theta_1=0\).

Now choose the second point, and call the length of the minor arc between the first point and it \(\alpha\). Now, clearly \(\alpha\epsilon(0,\pi)\) and is uniformly distributed. That is, \(P(\alpha=A) = \frac{1}{\pi} \forall A\epsilon(0,\pi)\).

If you draw yourself a picture, you can see that the length of the arc where \(\theta_3\) can fall in order for all three points to be on the same semicircle is \(2\pi-\alpha\). Since \(\theta_3\) is uniformly distributed, the probability of success given \(\alpha\) will be \(\frac{2\pi-\alpha}{2\pi}=1-\frac{\alpha}{2\pi}\).

To find the total probability of success, we integrate:
\(\int1-\frac{\alpha}{2\pi}dP_\alpha=\int_0^\pi(1-\frac{\alpha}{2\pi})\frac{1}{\pi}d\alpha\)

The result of this integral is \(\frac{3}{4}\).
Started with the same method and obtained the same result (3/4) as you did.
Appreciate and want to mark this up first. Haven't got the time to dig into the debate here about different answers yet.
Best, Guanting
 
Back
Top Bottom