Sunteți pe pagina 1din 6

Jane Street Capital Interview Questions

Nikolaos Rapanos March 8, 2010

First Round.

The rst round phone interview took place on Tuesday, 16 February 2010. I was asked the following questions: The Questions 1. Mental Arithmetic. Questions like 1 million - 101, 342 , 54 percent of 110 etc. 2. (a) What is the expected value of a fair die? (b) What will be the expected value of the same die if for each dot you are given 100 GBP? (c) Now you are given the chance to roll the die twice, but if you choose to do so then you are obliged to keep your second outcome. What is your strategy in order to maximize the expected value and what is the new expected value? (d) Same as (b) but now you are allowed to re-roll twice and obliged to keep your third roll. 3. You roll two dice and you are told that one of them is six. What is the probability that both are six? 4. You hold a ball 10m above the ground. You leave the ball and you are told that each time the ball hits the ground, it will bounce up to the half of the height it was left from. So the rst time the ball hits the ground will bounce up to 5m, the second time to 2.5m and so on. What is the total distance the ball will travel? How condent are you about your answer? The Answers 1. In general, we can speed up calculations using Vedic Mathematics or other simple tricks. For instance, 342 = 302 + 2 30 4 + 42 = 900 + 240 + 16 = 900 + 256 = 1156.
6

2. (a) The expected value of a fair die is


i=1

1 i = 3.5 (simply the values weighted by the corresponding 6

probabilities). (b) We only need to multiply each of the values by 100, and so the expected value will be 100 times greater than the previously computed expected value. Thus the new expected value turns out to be 350 GBP. (c) Obviously if the rst outcome is less than or equal to 3, we choose to roll the die again. Therefore, the new expected value will be the average of the expected values of the rst and the second round. The expected value of the rst round will be the expected value among the values that we choose to keep, namely 4, 5 and 6. Hence the expected value of the rst round is 5 and the expected value of the second round is 3.5 as derived above. Therefore, the new expected value will be 0.5(5 + 3.5) = 4.25. Note that as this is an extension of question (b) we also have to multiply by the factor 100, and so the expected value will become 425. What this says, is that if we play this game then we should expect to gain in average 425 GBP. (d) In this case we stop on the rst roll if we get 5 or 6 (higher than 4.25). Also we stop on the second 1 2 140 roll if we get 4, 5 or 6 (higher than 3.5). Hence the expected value is 100 5.5 + 4.25 = = 466.7 3 3 3 GBP.

Comments on Problem 2 Comment 1. Now we are told that we have to pay a (one-o) ticket in order to play the game in (b), and by denition the fair value of this ticket is the value that would force the expected prot to be zero. As follows, from the analysis above the fair value of this game would be 425 GBP. This can be interpreted as the maximum amount of money we are willing to spend in order to play the game (i.e. take the risk with the hope to make prot). The logic can be conversed. If for example we are the owner of this game, then we can set the ticket price for the game to be equal to the fair value of the game plus possibly a small margin for prot. Comment 2. In order to demonstrate the concept of the fair value consider the following example appeared in a past Jane Street interview: You pay a ticket in order to roll a die. If the result is 6, then you get 10 GBP. What is the fair value of this game? Let x be the fair value of this game. The expected prot for this game is EP = (10 x) Demanding EP 0 we get x 10 6 = 1.67 GBP.
1 6

x 5 6.

Comment 3. Now suppose that we are told that we have to pay a xed value ticket each time we decide to roll a die, then this value would be the half of the aforementioned fair value. In fact, if we follow the logic demonstrated above we can explicitly deduce this intuitive result. Indeed, if x is the fair value of the ticket then denoting by EP1 and EP2 the expected prots for the rst and second roll respectively, we get the following expressions: 1 1 EP1 = (100 5 x) x 2 2 1 1 EP2 = (100 3.5 x) x 2 2 Hence EP = EP1 + EP2 , and by demanding this total expected prot to be non-negative we get x 425 = 212.5 2

3. Solution 1. We know that all the possible combinations (outcomes) of two dice are 6 6 = 36. From these combinations, we are interested in those which contain at least one 6. This is equivalent to counting the outcomes which contain no 6 and then subtracting them from the total number of possible outcomes which is 36. The outcomes which contain no 6 are 5 5 = 25, and hence the outcomes which contain at 1 least one 6 are 36 25 = 11. Therefore the probability of having exactly two 6 is P = . 11 Solution 2. Alternatively, we can work this out with conditional probabilities. By A denote the event that both will face up a 6, and by B denote the event that at least one will face up a 6. Now, call B1 the event that the rst die is a 6, and B2 the event that the second die is a 6. It is more than obvious that B = B1 B2 and therefore P (B ) = P (B1 ) + P (B2 ) P (B1 B2 ). Using the denition of conditional probability we have: P (A|B ) =
1 P (A B ) 36 = = P (B ) P (B1 ) + P (B2 ) P (B1 B2 ) 1 6 1 36 1 1 6 36

1 11

Solution 3. A slight deviation from the solution discussed above, makes use of Bayes Theorem and worths to be presented here. Following the above notation we have: P (A|B ) = P (A) P (B |A) by Bayes Theorem, and plugging in numbers we get P (A|B ) = P (B )
1 36 11 36

1 11

Solution 4. Finally, we can also tackle this problem using Binomial Distribution (see Appendix A). We 1 roll two dice, so n = 2 and the probability of each outcome is a sixth, therefore p = 6 . Let us denote by Pn (x) the probability of x successes in n trials and in our case a success can be interpreted as a rolling a die and getting a six. Following the aforementioned notation, we conclude that the probability of having exactly two 6 can be calculated as the probability of two successes in two trials divided by the probability of having at least one success in two trials (which in turn is the sum of the probabilities of one success in two trials and two successes in two trials). Mathematically, we can write 2

P (A|B ) =

P2 (2) P2 (1) + P2 (2) 1 6


2

2 2

2 1 5 2 + 1 6 6 2

1 6

1 11

Comment. Especially the last solution to the problem makes evident that the problem can be naturally generalized and also a universal approach can be developed and adopted in similar situations. Obviously a prerequisite for this, is a deep understanding of Binomial Distribution. Consider for example the following problem which appeared in another Jane Street interview: You ip four coins and at least two are heads. What is the probability that exactly three are heads?
1 . This type of questions should ring the bell. The answer is Binomial Distribution for n = 4 and p = 2 Using the notation introduced in Solution 4, we compute the requested probability P as follows:

P =

P4 (3) 4 = P4 (2) + P4 (3) + P4 (4) 11

4. In this problem we have to be careful to take into account that the ball will travel once downwards and once upwards in each bounce. Therefore the total distance traveled by the ball can be calculated as d = 10 + 2 10 1 + 10 2
n

1 2

+ ... 1

=2

10 + 10

1 + 10 2

1 2

+ ...

10 =

=20 lim

1 n 2 1 2 1

10 = 20 2 10 = 30.

Regarding the condence question, I was told that there is no correct answer but the whole point is that after taking the decision to implement a trading idea, we rst have to allocate some time debating on how condent we are and consequently how much risk we are willing to take. I nd it helpful to think that I bet my own money on this, so even if I am sure about my answer I have to be quite reserved since I risk my own money.

Second Round.

The second round phone interview took place on Tuesday, 23 February 2010. I was asked the following questions: The Questions 1. You roll two dice. What is the probability that the product of the numbers you get is a perfect square? 2. Give a 10-digit number so that each digit represents the instances of that ordinal number in the whole number. 3. England will play ve cricket games against Russia. The team which will win the majority of the games will be the winner of the series. You have 100 GBP and you want to spend them betting on England being the winner of the series. Unfortunately, you nd out that you cannot place bets for the entire series; you can only bet for single games. In this case how could you use your 100 GBP, so that at the end if England is the winner of the series you will have won 100 GBP? Regarding the bets the rule is that if you win then you double the amount of money you had bet, and if you lose then you just lose the amount of money you had bet. The Answers 1. In this problem we have to be careful. In total there are 36 dierent outcomes. In order for the product of the two numbers to be a perfect square there are two cases: (a) the two numbers are the same (which can be done in 6 dierent ways) (b) the numbers are 1 and 4 (which can be done in 2 dierent ways). 2 8 = . Therefore the requested probability is 36 9 2. The answer is 6210001000. 3. This is a hard question, because it can be done only in one way. You can be wasting your time thinking about possible combinations and probabilities while what you should do is Brute Force. Namely, after the fth game our desired status is demonstrated in Table 1 below. Table 1: Desired Status after the fth game Englands wins Russias wins Status 5 0 +100 4 1 +100 3 2 +100 2 3 100 1 4 100 0 5 100 The information of the above table can be used in order to construct an equivalent table demonstrating the desired status after the fourth game. Table 2: Desired Status after the fourth game Englands wins Russias wins Status Bet for the next game 4 0 +100 0 3 1 +100 0 2 2 0 100 1 3 100 0 0 4 100 0 To understand how the above table is constructed, let us focus in the rst row. In the case that England has won four of the games, then there are two possible scenarios after the fth game. England will have won all of the ve games, or will have won all but one game. By examining Table 1 we observe that in both cases our desired status is +100. Therefore, if we call x the desired status at the rst row of Table 2 and y the bet we will place in the fth game; then according to the above explanation we can formulate the following equations: x + y = +100 (1)

x y = +100

(2)

From (1) and (2) above, we conclude that x = 100 and consequently y = 0. Note that Table 2 diers from Table 1 in that, it contains one more column with information on what our next bet should be. This is equal to the value of y as dened above, and can be calculated from two simultaneous equations as we just demonstrated. Similarly, we can ll the following rows of Table 2. We will use this technique to go backwards until we reach our base case, namely the rst game between England and Russia. Our results are presented in the following tables. Table 3: Desired Status after the third game Englands wins Russias wins Status Bet for the next game 3 0 +100 0 2 1 +50 50 1 2 50 50 0 3 100 0

Table 4: Desired Status after the second game Englands wins Russias wins Status Bet for the next game 2 0 +75 25 1 1 0 50 0 2 75 25

Table 5: Desired Status after the rst game Englands wins Russias wins Status Bet for the next game 1 0 37.5 37.5 0 1 37.5 37.5 The desired status after the rst game can be interpreted as the bet we are willing to place on the rst game. Therefore we can place 37.5 GBP on the rst game, and then according to the results we can follow the strategy implied by the y values of the above tables and we are ensured to win 100 GBP if England is the winner of the series, or lose 100 GBP in the opposite case. The betting strategy can be visualized using a tree diagram. ONML HIJK 37.5 h h h h h England Russia hh hhhh h h h hhh ONML HIJK ONML HIJK 37.5 37.5 h n h n h h n E Rnnn E R hhhh h nnn hhhhhhh n n h n ONML HIJK ONML HIJK ONML HIJK 50 25 25 n YYY hh E n h h n h n h R E R R E h YY nnn hhhh YY nnnnn hhhhhh ONML HIJK ONML HIJK ONML HIJK ONML HIJK 0 50 50 0 YY h n h n h h n YY h E E Rnnn R hhh h Y n E,R hhhhhhh E,R Y Y nnnnn h ONML HIJK ONML HIJK ONML HIJK 100 0 0 n n P it P rof it nnn rof Loss nnn n n n nn 100 +100

Figure 1. The betting strategy is demonstrated using a tree diagram structure. We start with 37.5 GBP bet for the rst game, and then we follow the tree nodes according to the results. 5

Appendix A
Binomial Distribution Suppose that n identical and independent experiments are conducted, and result in two mutually exclusive outcomes (often called success and failure ). Also, suppose that the probability of success is constant and equal to p (whereas the failure probability is q = 1 p). This scenario is called Binomial Distribution and has the following properties: The probability of x successes in n trials is given by the formula Pn (x) =
K

n x p (1 p)nx x

The probability of at most K successes in n trials is given by


x=0 n

Pn (x)

The probability of at least k success in n trials is given by


x=k

Pn (x)

The expected value of a random variable X obeying a Binomial Distribution is given by E [X ] = np The variance of a random variable X obeying a Binomial Distribution is given by 2 = np(1 p) As an example consider the following problem which has appeared in past Jane Street interview: John and Nick ip a coin sequentially. John counts 1 for heads and 0 for tails, whereas the opposite is true for Nick. The game nishes when one of the players reaches number 4. What is the probability of reaching game 7 in order to have a winner? For this to happen, we require 3 wins in 6 games from one of the players. Hence the probability will be 5 P6 (3) = 16 Geometric Distribution A dierent view of a sequence of identical and independent dichotomous trials is embodied in the question how many trials are required before the rst success ?. If p is the probability of a success, then to achieve a rst success at integer k , we must have observed k 1 failures. The probability of this event is P (X = k ; p) = (1 p)k1 p for given parameter p and for k = 1, 2, .... The random variable X that counts the number of trials until the rst success, has a geometric distribution. The following properties hold: The expected value of a geometric distribution is E [X ] = The variance of a geometric distribution is 2 = Consider the following two examples. 1. (Jane Street Interview ) (a) Two players A and B ip a coin sequentially. The game nishes when the sequence TTH is formed and player A wins or the sequence HTT is formed and player B wins. What is the probability that the game will nish at the nth ip? (b) What is the probability that the game will have nished before or at the nth ip. (c) What are the odds of player A winning the game? Solution. (a) The question is a bit tricky. First of all note that n 3. Also say that we have ipped the coin ve times for example, and the outcomes are labeled 1,2,...,5. In order to check that one of the two desired events has or has not occur until the 5th ip we have to check the triples (1,2,3), (2,3,4), (3,4,5) which are three, and in general two less than the number of the ip. The probability that a single triple 2 = 1 is one of the desired two, is 8 4 Therefore the probability that the game will nish at the nth ip is 3 n3 1 P = (4) 4 . (b) This is the probability that it will have not nished by the nth ip subtracted from n2 1, that is P = 1 ( 3 . (c) The odds are 1:1. 4) 2. (a) Consider throwing a fair coin. What is the probability that the rst head occurs on the third throw? (b) What is the expected number of throws before observing a head?
1 1 Solution. (a) P = 1 1 2 2 = 8 (b) Consider observing a head as a success with single probability p = 0.5. Then the random variable X that counts the number of trials until the rst success has a geometric distribution, and hence the requested expected number of throws is the expected value of the 1 random variable X , that is E [X ] = p = 2. 2 1p p2 1 p

S-ar putea să vă placă și