量化金融 · 第 18 册 · 职业发展

Interviews I: Maths, Probability and Speed

本书暂未推出简体中文版。现有版本:English, Français。

Interviews I: Maths, Probability and Speed · 职业发展

25Timed Test 2

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

Section A — 6 questions, 40 minutes

Question 25.1

An urn holds 5 red and 3 blue balls. You draw without replacement until one colour has run out. On average, how many balls are left in the urn when you stop?

Answer

Answer to Question 25.1.

The average is 74\frac74 balls.

Use indicators. A red ball is left over only if all 3 blue balls come out before it. Among that red ball and the 3 blue ones, every order is equally likely, so the chance that the red comes last is 14\frac14. Similarly, a blue ball is left over only if all 5 reds come before it, with chance 16\frac16.

Adding up, 5×14+3×16=54+12=745 \times \frac14 + 3 \times \frac16 = \frac54 + \frac12 = \frac74.

Classic wrong answer. Conditioning on which colour runs out and then trying to find the number remaining in each case. It can be done, but it takes much longer, and the case weights are easy to get wrong.

Question 25.2

You roll a pair of dice repeatedly. On average, how many rolls does it take until you have seen a total of 7 and also a total of 11, in either order?

Answer

Answer to Question 25.2.

The average is 19.519.5 rolls.

A roll gives 7 with chance 16\frac16 and 11 with chance 118\frac{1}{18}. Let AA and BB be the waiting times for each. The time to see both is max⁡(A,B)=A+B−min⁡(A,B)\max(A, B) = A + B - \min(A, B).

EA=6\mathbb{E}A = 6 and EB=18\mathbb{E}B = 18. The minimum is the wait for either total, which has chance 16+118=29\frac16 + \frac{1}{18} = \frac29 per roll, so Emin⁡=4.5\mathbb{E}\min = 4.5. The answer is 6+18−4.5=19.56 + 18 - 4.5 = 19.5.

Note that the result is only 1.51.5 above the rarer event alone, as the common event usually happens on the way.

Classic wrong answer. Adding 6 and 18. The two waits overlap, as the rolls count for both at once.

Question 25.3

A stock is at 100 and will be at 120 or 90 next period. Interest rates are zero. What is the price of a call struck at 100, and how many shares hedge one call?

Answer

Answer to Question 25.3.

The price is 203≈6.67\frac{20}{3} \approx 6.67, and the hedge is 23\frac23 of a share.

The call pays 20 or 0. A position of Δ\Delta shares moves by 30Δ30\Delta between the two states, so to match the 20 difference, Δ=23\Delta = \frac23.

With 23\frac23 of a share, the portfolio is worth 80 or 60. Borrowing 60 at no interest gives exactly 20 or 0, so the call costs 23×100−60=6.67\frac23 \times 100 - 60 = 6.67.

A second route: the risk-neutral chance of the up state solves 120q+90(1−q)=100120q + 90(1 - q) = 100, so q=13q = \frac13, and the price is 13×20\frac13 \times 20. The real chance of the up state appears nowhere.

Follow-up. What if the call were quoted at 7? Sell it, buy 23\frac23 of a share, and borrow the remainder. The position then earns the 33-cent difference in both states, with no risk.

Question 25.4

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

Answer

Answer to Question 25.4.

The probability is 16\frac16.

The boundary is y=1−x\sqrt{y} = 1 - \sqrt{x}, that is y=(1−x)2y = (1 - \sqrt{x})^2, so the event is the region under this curve in the unit square. Its area is

∫01(1−x)2 dx=∫01(1−2x+x) dx=1−43+12=16.\int_0^1(1 - \sqrt{x})^2\,dx = \int_0^1(1 - 2\sqrt{x} + x)\,dx = 1 - \frac43 + \frac12 = \frac16.

A second route: put U=XU = \sqrt{X} and V=YV = \sqrt{Y}. Since P(U≤u)=u2P(U \le u) = u^2, each has density 2u2u on [0,1][0, 1], and the answer is ∬u+v<14uv du dv=4⋅124=16\iint_{u + v < 1}4uv\,du\,dv = 4 \cdot \frac{1}{24} = \frac16.

Classic wrong answer. Answering 12\frac12, by treating the boundary as the straight line x+y=1x + y = 1. On [0,1][0, 1] we have x≥x\sqrt{x} \ge x, so the event forces X+Y<1X + Y < 1 and covers only part of that triangle: the curve bends in towards the origin.

Question 25.5

A fair coin is flipped 20 times and shows exactly 10 heads. How likely is it that exactly 5 of those heads came in the first 10 flips? Give an exact expression and a rough value.

Answer

Answer to Question 25.5.

The probability is (105)2/(2010)=63 504/184 756≈0.344\binom{10}{5}^2/\binom{20}{10} = 63\,504/184\,756 \approx 0.344.

Every particular sequence of 20 fair flips has the same chance, so given 10 heads in all, each of the (2010)\binom{20}{10} placements of those heads is equally likely. Exactly 5 in the first 10 flips means choosing 5 places there and 5 places in the last 10, which gives (105)2\binom{10}{5}^2 placements.

For a value, (2nn)≈4n/πn\binom{2n}{n} \approx 4^n/\sqrt{\pi n} turns the ratio into 10π/(5π)≈0.357\sqrt{10\pi}/(5\pi) \approx 0.357, which is close to the exact 0.3440.344.

Classic wrong answer. Answering (105)/210≈0.246\binom{10}{5}/2^{10} \approx 0.246, the chance of 5 heads in 10 flips with no condition. Fixing the total ties the two halves together: more heads early forces fewer late, which narrows the count in the first half.

Follow-up. How do the two compare in general, for large samples? The conditional chance is larger by a factor of about 2\sqrt{2}, since the variance of the count in the first half is halved. Here 0.344/0.246=1.400.344/0.246 = 1.40.

Question 25.6

A fair coin is flipped until the first head. You are told that the number of flips was even. Given this, what is the expected number of flips?

Answer

Answer to Question 25.6.

The expected number of flips is 83\frac83.

Let NN be the number of flips, so P(N=k)=2−kP(N = k) = 2^{-k} and P(N=2j)=4−jP(N = 2j) = 4^{-j}. These sum to 13\frac13, the chance of an even count. Given an even count, P(N=2j)=3⋅4−jP(N = 2j) = 3 \cdot 4^{-j}, so N/2N/2 is geometric with success chance 34\frac34 and mean 43\frac43. So NN has conditional mean 83\frac83.

A direct sum agrees: ∑j2j 4−j=89\sum_j 2j\,4^{-j} = \frac89, and 89/13=83\frac89 \big/ \frac13 = \frac83.

Classic wrong answer. Saying 4, by doubling the unconditional mean of 2, since NN is twice N/2N/2. Given an even count, N/2N/2 is not distributed like NN: the value 1 has chance 34\frac34, not 12\frac12.

Follow-up. What does this give for a coin with heads chance pp? 2/(1−(1−p)2)2/(1 - (1 - p)^2). It tends to 2 as pp tends to 1, as it must, since 2 is the smallest even count.

Section B — 6 questions, 60 minutes

Question 25.7

A deck of 52 cards is dealt to four players, 13 each. You look at your hand and see exactly two aces. What is the probability that the other two aces are together in one player’s hand?

Answer

Answer to Question 25.7.

The probability is 1238=619≈0.316\frac{12}{38} = \frac{6}{19} \approx 0.316.

The 39 cards you cannot see form three hands of 13. Place the two missing aces one at a time among those 39 slots. The first goes anywhere. The second must take one of the 12 other slots in that hand, out of the 38 left.

A count of pairs gives the same value: of the (392)=741\binom{39}{2} = 741 pairs of slots, 3(132)=2343\binom{13}{2} = 234 lie in one hand, and 234741=619\frac{234}{741} = \frac{6}{19}.

Classic wrong answer. Saying 13\frac13, since there are three hands for the second ace. A hand already holding an ace has only 12 free slots, against 13 in each of the others. With hands of hh cards the chance is (h−1)/(3h−1)(h - 1)/(3h - 1): this is 0 for h=1h = 1, and it tends to 13\frac13 only for large hh.

Question 25.8

Ten couples sit at random around a circular table. On average, how many couples are sitting next to each other?

Answer

Answer to Question 25.8.

The average is 2019≈1.05\frac{20}{19} \approx 1.05 couples.

Use an indicator for each couple. Fix one partner’s seat. The other partner is equally likely to be in any of the remaining 19 seats, and exactly 2 of them are adjacent. So each couple sits together with chance 219\frac{2}{19}.

By linearity, the mean is 10×219=201910 \times \frac{2}{19} = \frac{20}{19}. The indicators are dependent, but linearity does not care.

The mean is 2n/(2n−1)2n/(2n - 1) for n≥2n \ge 2 couples, which tends to 1 as nn grows, and the count tends to a Poisson with mean 1.

Classic wrong answer. Trying to find the distribution of the number of adjacent couples. That needs inclusion–exclusion, while the mean needs only one line.

Question 25.9

An equally weighted index holds 100 stocks, each with volatility 30%, and every pair of stocks has the same correlation ρ\rho. The index has volatility 15%. What is ρ\rho?

Answer

Answer to Question 25.9.

ρ=0.24/0.99≈0.242\rho = 0.24/0.99 \approx 0.242.

The variance of an equally weighted basket of NN names is

σI2=σ2(1N+(1−1N)ρ).\sigma_I^2 = \sigma^2\left(\frac1N + \left(1 - \frac1N\right)\rho\right).

With σI2/σ2=(15/30)2=0.25\sigma_I^2/\sigma^2 = (15/30)^2 = 0.25 and N=100N = 100: 0.25=0.01+0.99ρ0.25 = 0.01 + 0.99\rho, so ρ=0.24/0.99\rho = 0.24/0.99.

Without the correction for finite NN, the quick answer is 0.250.25, which is close. For large NN, the ratio of the two variances is just the correlation, and that is how a desk reads an average correlation from an index and its members.

Sanity check: at ρ=1\rho = 1, the index vol is 30%, and at ρ=0\rho = 0, it is 3%.

Follow-up. The index’s options imply 15%, and the stocks’ options imply 30%. A trader thinks that realised correlation will be 0.150.15. What vol does this imply for the index? 30%×0.01+0.99×0.15=11.9%30\% \times \sqrt{0.01 + 0.99 \times 0.15} = 11.9\%, below the 15% implied. That is the trade that dispersion desks consider.

Question 25.10

XX and YY are independent and uniform on [0,1][0, 1]. What is the probability that X/YX/Y, rounded to the nearest integer, is even?

Answer

Answer to Question 25.10.

The probability is 5−π4≈0.4646\frac{5 - \pi}{4} \approx 0.4646.

The ratio rounds to 0 when X/Y<12X/Y < \frac12, with probability 14\frac14 (a triangle of base 12\frac12 and height 1).

For r≥1r \ge 1, P(X/Y>r)=1/(2r)P(X/Y > r) = 1/(2r). So the ratio rounds to 2k2k, for k≥1k \ge 1, with probability

12(12k−12−12k+12)=14k−1−14k+1.\frac12\left(\frac{1}{2k - \frac12} - \frac{1}{2k + \frac12}\right) = \frac{1}{4k - 1} - \frac{1}{4k + 1}.

The sum over kk is 13−15+17−19+…\frac13 - \frac15 + \frac17 - \frac19 + \dots, which by the Leibniz series is 1−π41 - \frac{\pi}{4}.

Adding 14\frac14 gives 54−π4\frac54 - \frac{\pi}{4}. A simulation returns 0.4650.465. It is below 12\frac12, because the odd value 1 alone takes about 0.420.42 of the mass, more than the even value 0.

Classic wrong answer. Using P(X/Y>r)=1/rP(X/Y > r) = 1/r. The region X>rYX > rY in the unit square is a triangle of base 1 and height 1/r1/r, so there is a factor of 12\frac12.

Question 25.11

In tennis, a player wins each point independently with probability 0.60.6. A game is won by reaching 4 points with a lead of at least 2. What is the probability that the player wins the game?

Answer

Answer to Question 25.11.

The probability is about 0.7360.736.

Split by the score at which the game ends. With p=0.6p = 0.6 and q=0.4q = 0.4:

Winning to love, to 15 and to 30: p4(1+4q+10q2)=0.1296×4.2=0.544p^4(1 + 4q + 10q^2) = 0.1296 \times 4.2 = 0.544.

Reaching deuce, 3–3: (63)p3q3=20×0.216×0.064=0.276\binom63p^3q^3 = 20 \times 0.216 \times 0.064 = 0.276.

From deuce, two points decide or return to deuce. Win two with p2p^2, lose two with q2q^2, so the chance of winning from deuce is

p2p2+q2=0.360.52=0.692.\frac{p^2}{p^2 + q^2} = \frac{0.36}{0.52} = 0.692.

Total: 0.544+0.276×0.692=0.7360.544 + 0.276 \times 0.692 = 0.736. An exact recursion over all scores agrees.

A 0.60.6 point edge becomes a 0.740.74 game edge, and that is how small edges compound through repeated play.

Classic wrong answer. Forgetting the coefficients, or writing (63)\binom{6}{3} wrongly for love, 15 and 30. The last point must be won, so the counts are (30)\binom{3}{0}, (41)\binom{4}{1} and (52)\binom{5}{2}.

Question 25.12

Evaluate the sum ∑n≥1n2/2n\sum_{n \ge 1}n^2/2^n. What probability model gives the answer directly?

Answer

Answer to Question 25.12.

The sum is 6.

Let NN be the number of flips until the first head, so P(N=n)=2−nP(N = n) = 2^{-n}. The sum is EN2\mathbb{E}N^2. For a geometric variable with p=12p = \frac12, the mean is 2, and the variance is (1−p)/p2=2(1 - p)/p^2 = 2. So EN2=2+4=6\mathbb{E}N^2 = 2 + 4 = 6.

A direct route: from ∑xn=1/(1−x)\sum x^n = 1/(1 - x), differentiating and multiplying by xx twice gives ∑n2xn=x(1+x)/(1−x)3\sum n^2x^n = x(1 + x)/(1 - x)^3. At x=12x = \frac12, this is 12⋅32⋅8=6\frac12 \cdot \frac32 \cdot 8 = 6. A partial sum confirms it.

Follow-up. What is ∑n3/2n\sum n^3/2^n? 26. Differentiating once more gives x(1+4x+x2)/(1−x)4=12⋅134⋅16=26x(1 + 4x + x^2)/(1 - x)^4 = \frac12 \cdot \frac{13}{4} \cdot 16 = 26.

Why it matters. Turning a series into a moment saves algebra and it gives a second way of checking the answer.