Finanças quantitativas · Livro 18 · Carreiras

Interviews I: Maths, Probability and Speed

Este livro ainda não está disponível em Português. Edições: English, Français.

Interviews I: Maths, Probability and Speed · Carreiras

31Timed Test 8

Take it in one sitting, without notes or a calculator.

Section A — 6 questions, 40 minutes

Question 31.1

Which is more likely: at least one six in 4 rolls of a fair die, or at least one double six in 24 rolls of a pair of fair dice? Give both probabilities. You may use (3536)24≈0.509(\frac{35}{36})^{24} \approx 0.509.

Answer

Answer to Question 31.1.

The first is more likely, with 0.5180.518 against 0.4910.491.

Use the complement. The first is 1−(56)4=1−6251296=0.5181 - (\frac56)^4 = 1 - \frac{625}{1296} = 0.518. The second is 1−(3536)24=0.4911 - (\frac{35}{36})^{24} = 0.491.

The attraction of the wrong answer is that they look the same. In both, the number of tries times the chance per try is 23\frac23, since 4×16=24×1364 \times \frac16 = 24 \times \frac{1}{36}. But this linear rule counts overlaps as if they did not occur, and the many small tries overlap more than the few large ones: the expected number of pairs of hits is about 0.210.21 against 0.170.17. An exact calculation confirms both, and a simulation agrees.

In the limit of many small tries, the chance tends to 1−e−2/3=0.4871 - e^{-2/3} = 0.487, so the second is already close to it.

Classic wrong answer. Saying that the two are equal, because both have an expected count of 23\frac23. An expected count is not a probability.

Question 31.2

A walker on a square grid starts at the origin and takes 4 steps, each one up, down, left or right with equal probability. How likely is the walker to be back at the origin after the 4 steps?

Answer

Answer to Question 31.2.

The probability is 964≈0.141\frac{9}{64} \approx 0.141.

Direct count: the closed walks have either two opposite pairs of the same axis, or one pair on each axis. Two pairs on one axis: (42)=6\binom42 = 6 orders for each of 2 axes, so 12. One pair on each axis: 4!=244! = 24 orders. That makes 36 walks out of 44=2564^4 = 256.

A second route rotates the grid by 45∘45^\circ. Then each step moves both new coordinates by ±1\pm1, independently. Each coordinate is a separate walk, and each returns after 4 steps with chance (42)/16=38\binom42/16 = \frac38. The square of this is 964\frac{9}{64}.

An enumeration of all 256 walks confirms it. The chance is lower than the 38\frac38 of one dimension, as there is more room to wander.

Classic wrong answer. Counting only the walks that step out twice and come straight back. Walks such as right, up, left, down also close, and the order of the moves matters.

Question 31.3

A stock pays a dividend of 4 next year, and the dividend grows at a constant rate forever. If the required return is 8% and the price is 100, what growth rate is the market pricing in? What is the price if the growth rate is 5%?

Answer

Answer to Question 31.3.

The market is pricing in 4%4\% growth. At 5%5\%, the price is about 133.

The growing perpetuity gives P=Dr−gP = \frac{D}{r - g}. So 100=40.08−g100 = \frac{4}{0.08 - g}, and g=4%g = 4\%. A numerical sum of the discounted dividends gives the same price of 100.

At g=5%g = 5\%, P=40.03=133.3P = \frac{4}{0.03} = 133.3. A single point of growth raises the price by a third. This is why long-horizon assets are so sensitive to growth and rates.

Limit check: as gg tends to rr, the price goes to infinity, and the formula fails at or above rr. In that case, the sum diverges, which means that the assumption, not the market, is wrong.

Classic wrong answer. Treating the 8% as dividend yield alone, and so answering zero growth. The yield is 4%, and growth must supply the rest.

Question 31.4

You roll three fair dice. What is the probability that the highest and the lowest of the three values differ by exactly 5?

Answer

Answer to Question 31.4.

The probability is 536\frac{5}{36}.

A difference of 5 means both a 1 and a 6 appear. Use inclusion–exclusion over the complement.

There are 216 outcomes. Those with no 1 number 53=1255^3 = 125, and the same for no 6. Those with neither number 43=644^3 = 64. So the good outcomes are 216−125−125+64=30216 - 125 - 125 + 64 = 30. And 30216=536\frac{30}{216} = \frac{5}{36}.

A direct count checks it: the third die is a 1 or a 6, with 3 orders each, which gives 6, or a value from 2 to 5, with 6 orders each, which gives 24. The total is 30.

Classic wrong answer. Counting 3!×63! \times 6 for the third die in all cases, which gives 36. When the third die repeats a 1 or a 6, there are fewer orders.

Question 31.5

XX and YY are independent and uniform on [0,1][0, 1]. What is the probability that X+Y<1X + Y < 1, given that X<12X < \frac12?

Answer

Answer to Question 31.5.

The probability is 34\frac34.

Given X=xX = x, the chance that Y<1−xY < 1 - x is 1−x1 - x. Conditioning on X<12X < \frac12 makes XX uniform on [0,12][0, \frac12], with mean 14\frac14. So the answer is 1−14=341 - \frac14 = \frac34.

Geometrically, the conditioning region is a rectangle of area 12\frac12. The part of it under the line x+y=1x + y = 1 is a trapezium of area 38\frac38. The ratio is 34\frac34.

A simulation agrees. A limit check: conditioning on X<aX < a for small aa gives 1−a/21 - a/2, which tends to 1, and for a=1a = 1 gives 12\frac12, the unconditional chance.

Classic wrong answer. Giving 12\frac12, the unconditional value. Knowing that XX is small makes the sum smaller, so the chance must go up.

Question 31.6

A set of 28 dominoes has each unordered pair of the numbers 0 to 6 exactly once, including the doubles. You draw two at random. What is the probability that they share a number, so that they can be placed end to end?

Answer

Answer to Question 31.6.

The probability is 718\frac{7}{18}.

Condition on the type of the first tile. A double has chance 728=14\frac{7}{28} = \frac14. It matches the 6 other tiles with that number. A non-double has chance 34\frac34, and it matches 6 others on each of its two numbers, so 12 tiles.

Out of the 27 tiles left,

14⋅627+34⋅1227=6+36108=718.\frac14 \cdot \frac{6}{27} + \frac34 \cdot \frac{12}{27} = \frac{6 + 36}{108} = \frac{7}{18}.

An enumeration of the (282)\binom{28}{2} pairs gives 147 matching pairs out of 378, which is the same value.

Classic wrong answer. Counting 12 matches for every tile, which gives 49\frac49. A double has only one number to offer.

Section B — 6 questions, 60 minutes

Question 31.7

You draw independent uniform numbers on [0,1][0, 1] and stop when a number is smaller than the one before it. What is the expected number of draws?

Answer

Answer to Question 31.7.

The expected number is e≈2.718e \approx 2.718.

Let NN be the number of draws. We have N>nN > n exactly when the first nn draws are in increasing order, which has chance 1n!\frac{1}{n!}, by symmetry among the n!n! orderings. So

EN=∑n≥0P(N>n)=∑n≥01n!=e.\mathbb{E}N = \sum_{n \ge 0}P(N > n) = \sum_{n \ge 0}\frac{1}{n!} = e.

A simulation returns 2.7182.718.

Check small cases: P(N=2)=12P(N = 2) = \frac12, a descent at once, and P(N=3)=12−16=13P(N = 3) = \frac12 - \frac16 = \frac13. These two alone contribute 2 to the mean, so a total just under 3 is sensible.

The answer does not depend on the distribution, provided that it is continuous, because only the ordering matters.

Classic wrong answer. Treating each later draw as having chance 12\frac12 of being a descent, which gives 3 by a geometric law. A long increasing run makes the last value high, and so the next descent likelier.

Question 31.8

In a match, A needs 2 more wins and B needs 3 more. The match is stopped now, and the stake is split in proportion to each chance of winning, with fair games. What share does A get? What if A wins each game with probability 0.60.6?

Answer

Answer to Question 31.8.

With fair games, A’s share is 1116\frac{11}{16}. With p=0.6p = 0.6, it is about 0.8210.821.

Play all the games that could be needed, even if the match would stop early. At most 4 games decide it. A wins exactly when A wins at least 2 of the 4, since B then cannot reach 3.

With fair games, the chance is 1−1+416=11161 - \frac{1 + 4}{16} = \frac{11}{16}.

With p=0.6p = 0.6, the chance that A wins 0 or 1 games is 0.44+4×0.6×0.43=0.0256+0.1536=0.17920.4^4 + 4 \times 0.6 \times 0.4^3 = 0.0256 + 0.1536 = 0.1792. So the share is 0.82080.8208. A direct recursion over the score gives both figures.

Limit check: if A needed no more games, the share would be 1, and if both needed the same number, it would be 12\frac12.

Classic wrong answer. Splitting by games still needed, in the ratio 3 to 2, which gives 35\frac35. That ignores how the remaining games can fall.

Why it matters. This is the root of pricing by a tree: the value now is the weighted value of what can still happen.

Question 31.9

To sample a point uniformly from the unit ball in 3 dimensions, you draw from the enclosing cube and reject the points outside. What is the acceptance rate, and the expected number of draws per accepted point? What is the acceptance rate in 10 dimensions, given that the ball’s volume there is π5120\frac{\pi^5}{120}?

Answer

Answer to Question 31.9.

In 3 dimensions, the rate is π6≈0.524\frac{\pi}{6} \approx 0.524, with 6π≈1.91\frac{6}{\pi} \approx 1.91 draws. In 10 dimensions, the rate is about 0.00250.0025.

The acceptance rate is the ratio of volumes. The ball has volume 43π\frac43\pi, and the cube has side 2, so volume 8. That gives π6\frac{\pi}{6}. The number of draws is geometric, with mean equal to the inverse rate.

In 10 dimensions, the cube has volume 210=10242^{10} = 1024. And π5≈306\pi^5 \approx 306, so the ball has 306120=2.55\frac{306}{120} = 2.55. The ratio is 2.551024=0.0025\frac{2.55}{1024} = 0.0025, or about 400 draws per point.

A simulation confirms both. So rejection from a cube fails in high dimension, since almost all the cube lies in its corners. Instead, draw a normal vector, normalise it, and scale the radius.

Classic wrong answer. Expecting the rate to settle near 12\frac12, because it is so in low dimension. It falls faster than exponentially in the dimension.

Question 31.10

A 52-card deck is shuffled. What is the expected number of kings that appear before the first ace?

Answer

Answer to Question 31.10.

The expected number is 45\frac45.

Take one king and the four aces. Among these five cards, the king is equally likely to be in any position, so it comes first with chance 15\frac15.

So each king comes before all the aces with chance 15\frac15. Indicators add over the 4 kings, and this gives 45\frac45.

A simulation returns 0.800.80. A second route: the non-aces before the first ace number 485\frac{48}{5} on average, and kings are 4 of the 48, so the mean is 485⋅448=45\frac{48}{5} \cdot \frac{4}{48} = \frac45.

Note that the other 44 cards in the deck do not matter, and the first route never used them.

Classic wrong answer. Using 14\frac14 per king, which gives 1. Each king races against 4 aces, so five cards are in the race, not four.

Question 31.11

Five people get into a lift at the ground floor of a building with 6 floors above it. Each chooses a floor independently and uniformly. What is the expected number of stops? What is the probability that all five go to different floors?

Answer

Answer to Question 31.11.

The expected number of stops is 46511296≈3.59\frac{4651}{1296} \approx 3.59, and the probability is 554≈0.093\frac{5}{54} \approx 0.093.

A floor gets no stop with chance (56)5=31257776(\frac56)^5 = \frac{3125}{7776}. Summing indicators over the 6 floors,

E=6(1−31257776)=46511296.\mathbb{E} = 6\left(1 - \frac{3125}{7776}\right) = \frac{4651}{1296}.

All different: 6⋅5⋅4⋅3⋅2=7206 \cdot 5 \cdot 4 \cdot 3 \cdot 2 = 720 of the 65=77766^5 = 7776 choices, or 554\frac{5}{54}.

An enumeration over all the 7776 choices gives the same. A limit check: with many floors, the stops tend to 5, one per person. With one floor, the expression gives exactly 1.

Classic wrong answer. Answering 5, one for each person, with no allowance for shared stops. Each floor must be looked at, not each person.

Question 31.12

Two regressors each have correlation 12\frac12 with yy and correlation 12\frac12 with each other. What is the R2R^2 of the regression of yy on both? What is it with one regressor alone?

Answer

Answer to Question 31.12.

The R2R^2 with both is 13\frac13, and with one alone it is 14\frac14.

Using standardised variables, the coefficients solve b1+12b2=12b_1 + \frac12b_2 = \frac12 and 12b1+b2=12\frac12b_1 + b_2 = \frac12. By symmetry, b1=b2=13b_1 = b_2 = \frac13.

And R2=∑bici=13⋅12+13⋅12=13R^2 = \sum b_ic_i = \frac13 \cdot \frac12 + \frac13 \cdot \frac12 = \frac13.

With one alone, it is the squared correlation, 14\frac14. So the second regressor adds only 112\frac{1}{12}. A numerical solve agrees.

Limit checks: if the regressors were uncorrelated, the R2R^2 would be 14+14=12\frac14 + \frac14 = \frac12, and if they were perfectly correlated, it would stay 14\frac14. Our value lies between the two, as it should.

Classic wrong answer. Adding the squares, which gives 12\frac12. That only holds for uncorrelated regressors, as the overlap must not count twice.