Joshi Quant Interviews Selected Problems

Table of Contents

The red book Quant Job Interview Questions and Answers is an excellent book signatured by its completeness and the follow-up questions after each solution. Since the primary author named Mark Joshi, for easiness, I will call it Joshi Book.

ChapterComments
Option Pricing
ProbabilityOmit 32, 34-38
Interest Rates
Numerical and Algo
Math
Coding C++
Brainteasers

Chapter 3 Probability

1-100 Number Game

Question 3.4. We play a game: I pick a number $n$ from 1 to 100 . If you guess correctly, I pay you $\$ n$ and zero otherwise. How much would you pay to play this game?

The payer tends to choose a small number because he pays less. But if the player knows this, then the likelihood to pay is also increasing. This is a game theory problem.

Translate this to math, for the picked number $k$, we want the payoff and the likelihood be reciprocal to reflect the above principle. Then the probability that among $1-100$, that number $k$ is selected is

$$ \frac{1}{k}\left(\sum_{j=1}^{100} \frac{1}{j}\right)^{-1} $$

And the expected payoff is natural to be $\left(\sum_{j=1}^{100} \frac{1}{j}\right)^{-1}$.

Dart Game

Question 3.13. Suppose you are throwing a dart at a circular board. What is your expected distance from the center? Make any necessary assumptions. Suppose you win a dollar if you hit 10 times in a row inside a radius of $R / 2$, where $R$ is the radius of the board. You have to pay 10 c for every try. If you try 100 times, how much money would you have lost/made in expectation? Does your answer change if you are a professional and your probability of hitting inside $R / 2$ is double of hitting outside $R / 2 ?$
The probability that the dart is inside the circle with radius $s$ is $\left(\frac{s}{R}\right)^{2}$. So you only have $1/4$ probability to have 10 times in a row. This means $2^{-20}$ probability. For 100 trials, 10 dollars are paid, but the chance to win 1 dollar is only $100\times2^{-20}$, so you should not play the game.

Even the hitting chance increases to $2/3$, this is still a bad choice.

Kth Order Statistic

Question 3.32. What is the distribution function and density function of the $k$ th order statistic?

Convolution Z=X+Y and Z=XY

Chapter 8 Brainteasers

Snow Clearing Car

Question 8.11. Snow starts falling sometime before midday. A snow clearing car begins work at midday, and the car's speed is in reverse proportion to the time since the snow began falling. The distance covered by the snow car from midday until $1 \mathrm{pm}$ is double that from $1 \mathrm{pm}$ to $2 \mathrm{pm}$. When does the snow start?

Suppose the snow has began $x$ hours before midday. The speed of the snow car is function of $t$, and denote it as $s(t)=\frac{\alpha}{t}$. Denote the distance covered during a period of time as $d(t_1, t_2)$, then as indicated by the question, we can write down,

$$ \begin{gathered} d(x, x+1)=2 d(x+1, x+2) \\ \int_{x}^{x+1} \frac{\alpha}{t} d t=2 \int_{x+1}^{x+2} \frac{\alpha}{t} d t \end{gathered} $$

Solving the $x$, we have $x=\frac{1}{2}(-1 \pm \sqrt{5})$. Only the positive answer is kept.

Balance Integers

Question 8.12. What is the smallest number of integer weights required to exactly balance every integer between 1 and 40 . Prove it.

Subset of Integers

Question 8.13. Find the smallest subset of integers that you can use to produce $1,2, \ldots, 40$ by only using "+" or "-" (each number in the subset can be used at most one time).

Brown and Blue Eyes

Question 8.20. 50 smart, logical people are on an island. The people either have blue or brown eyes. The island has a certain set of rules. If you can work out that you definitely have blue eyes, then you have to commit suicide at 12 midnight. But you have to be $100 \%$ certain - i.e. you have to deduce logically that you have blue eyes. There are no mirrors and nobody can tell you what colour your eyes are. First, what happens? Then, one day a man from outside the village comes along and tells everybody on the island that there is at least one person that has blue eyes on the island. What happens?
  1. If there is only one blue-eye person. Then he will commit suicide at 1st day as he knows everyone else has brown eye.
  2. If there are two blue-eye person, both of them know the other person with blue eye, but they are not sure about themselves. However, they know if the other person is logical enough, and he is the only one of blue-eye, he will commit suicide as indicated by 1. The next day, if they find nothing happened last night, then they know they two are the blue-eye people, they will commit suicides together at 2nd night.
  3. Same story for $n$ people.
  4. The result is that, if there exists $n$ blue-eye people, they will commit suicide at the same time on the $n-th$ night.

NIM

Question 8.23. You are asked to play NIM, with the last one to pick up a stick losing. What's the optimal strategy?

There are various versions of the game of NIM but let’s consider a simple one. There are $n$ matches, for example 10 , on the table. Each turn you can take 1,2 or 3 matches. The person who takes the last stick loses.

Think backward. We want to leave exactly 1 stick for the opponent, which can be made if we leave him with 5 sticks. No matter how he picks, we can leave 1 stick for him to lose. Then the next position is to leave 9 sticks. Overall, if we left $4j+1$ sticks to our opponent, then we are guaranteed to win.

Yiming Zhang
Yiming Zhang
Quantitative Researcher Associate, JP Morgan