Keuangan Kuantitatif · Buku 18 · Karier

Interviews I: Maths, Probability and Speed

Buku ini belum tersedia dalam Bahasa Indonesia. Edisi: English, Français.

Interviews I: Maths, Probability and Speed · Karier

29Timed Test 6

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

Section A — 6 questions, 40 minutes

Question 29.1

A rook and a king stand on two different random squares of an 8 by 8 chessboard. What is the probability that the rook attacks the king, ignoring any blocking? What is the probability that the king attacks the rook, meaning that they stand on neighbouring squares, including diagonals?

Answer

Answer to Question 29.1.

The rook attacks with probability 29\frac29, and the king with probability 548\frac{5}{48}.

A rook attacks the same 14 squares wherever it stands: 7 in its row and 7 in its column. The other piece is on one of the 63 remaining squares, so the chance is 1463=29\frac{14}{63} = \frac29.

A king’s reach depends on where it stands. There are 4 corners with 3 neighbours, 24 edge squares with 5, and 36 inner squares with 8. The neighbouring ordered pairs total 12+120+288=42012 + 120 + 288 = 420, out of 64×63=403264 \times 63 = 4032. So the chance is 548\frac{5}{48}. An enumeration confirms both.

Classic wrong answer. Using 8 neighbours everywhere, which gives 863\frac{8}{63}. It ignores that the board’s edge cuts off about a fifth of those neighbours, since 28 of the 64 squares have fewer than 8.

Question 29.2

Four teams play a round robin: each pair meets once, and each game is a fair coin flip with no draws. What is the probability that some team wins all its games? What is the probability that some team wins all and some team loses all?

Answer

Answer to Question 29.2.

The first probability is 12\frac12, and the second is 38\frac38.

One team wins its 3 games with chance 18\frac18. Two teams cannot both do so, because they meet. So these events are disjoint, and the sum is 4×184 \times \frac18.

For the second, choose the winner and the loser, in 4×34 \times 3 ordered ways. Together, these two teams play 5 distinct games, as their match counts once. So each ordered choice has chance 2−52^{-5}. These events are disjoint too, which gives 1232=38\frac{12}{32} = \frac38.

An enumeration over all 262^6 outcomes confirms both. With nn teams, the first chance is n2−(n−1)n2^{-(n - 1)}, which goes to 0 quickly, as it should.

Classic wrong answer. Using 1−(78)41 - (\frac78)^4, which treats the four events as independent. They exclude each other, so the plain sum is exact.

Question 29.3

A 52-card deck is shuffled. What is the expected position of the first ace? What is the probability that the first two cards have the same rank?

Answer

Answer to Question 29.3.

The expected position is 535=10.6\frac{53}{5} = 10.6, and the probability is 117\frac{1}{17}.

The 4 aces split the 48 other cards into 5 gaps. By symmetry, all gaps have the same expected size, 485=9.6\frac{48}{5} = 9.6. The first ace comes after the first gap, so its position has mean 10.610.6.

Whatever the first card is, 3 of the remaining 51 cards share its rank, and 351=117\frac{3}{51} = \frac{1}{17}.

A simulation agrees with both. As a limit, with 48 aces and 4 other cards, the same rule gives 5349\frac{53}{49}, just above 1, as it should be.

Classic wrong answer. Answering 13, the deck size over the number of aces. This is the spacing between aces if the deck is a circle, and it ignores the gap after the last ace, which also takes its share.

Question 29.4

A stock is at 50, and in one period it will go to 65 or to 45. The interest rate is zero. What is a call with strike 50 worth? What position in the stock and cash replicates it? Does the value change if the stock goes up with a real probability of 90%?

Answer

Answer to Question 29.4.

The call is worth 154=3.75\frac{15}{4} = 3.75, replicated with 34\frac34 of a share and −33.75-33.75 in cash. A real probability of 90% does not change the value.

The call pays 15 or 0. Holding Δ\Delta shares and cash cc, we need 65Δ+c=1565\Delta + c = 15 and 45Δ+c=045\Delta + c = 0. So Δ=1520=34\Delta = \frac{15}{20} = \frac34 and c=−33.75c = -33.75. The cost is 34×50−33.75=3.75\frac34 \times 50 - 33.75 = 3.75.

As a second route, the risk-neutral probability pp makes the stock fair: 65p+45(1−p)=5065p + 45(1 - p) = 50, so p=14p = \frac14, and the value is 14×15\frac14 \times 15.

Any other price gives a free profit against the replicating portfolio, whatever the real odds. The real expected payoff of 13.513.5 is not a price.

Classic wrong answer. Pricing at the real expected payoff. This is the usual error, and the replication shows why it fails.

Question 29.5

A shuffled deck holds 26 red cards and 26 black cards. What is the expected number of neighbouring cards of the same colour? Separately, what is the expected number of pairs of the same rank in a hand of 5 cards from a standard 52-card deck?

Answer

Answer to Question 29.5.

The expected number of neighbouring same-colour pairs is 25, and the expected number of pairs in a hand is 1017\frac{10}{17}.

Each of the 51 neighbouring positions has a same-colour pair with chance 2551\frac{25}{51}. Indicators add with no need for independence, so the mean is exactly 25.

In a hand, each of the (52)=10\binom52 = 10 pairs of cards has the same rank with chance 351\frac{3}{51}. So the mean is 3051=1017≈0.59\frac{30}{51} = \frac{10}{17} \approx 0.59.

A simulation returns 25.0 and 0.5880.588. Note that a hand with three of a kind counts as 3 pairs here, and the indicators count it correctly.

Classic wrong answer. Using 12\frac12 for the neighbouring pair, which gives 25.525.5. Having seen a red, there is one fewer red left.

Question 29.6

Each square of a 3 by 3 grid is coloured black or white with equal probability. What is the expected number of lines (rows, columns and the two diagonals) that have a single colour? How likely is it that one or more of the three rows have a single colour?

Answer

Answer to Question 29.6.

The expected number of lines is 2, and the probability is 3764\frac{37}{64}.

There are 8 lines. Each is single-coloured with chance 2×2−3=142 \times 2^{-3} = \frac14. Indicators give 8×14=28 \times \frac14 = 2, even though the lines overlap.

The three rows share no squares, so they are independent. No row is single-coloured with chance (34)3=2764(\frac34)^3 = \frac{27}{64}, and the answer is the complement.

An enumeration over the 512 grids confirms both. Only 32 of the 512 grids have no such line at all. Dependence moves the distribution of the count, but not its mean.

Classic wrong answer. Taking the chance of at least one line among all 8 as 1−(34)81 - (\frac34)^8. The lines share squares, so they are not independent. Only the rows are.

Section B — 6 questions, 60 minutes

Question 29.7

Ten balls are thrown independently and at random into 10 bins. What is the expected number of empty bins? What is the probability that exactly one bin is empty? You may use 0.910≈0.3490.9^{10} \approx 0.349 and 9!=362 8809! = 362\,880.

Answer

Answer to Question 29.7.

The expected number is about 3.493.49, and the probability is about 0.01630.0163.

A given bin is empty with chance 0.9100.9^{10}. So the mean is 10×0.349=3.4910 \times 0.349 = 3.49, a little below the large-nn value of 10/e=3.6810/e = 3.68.

With exactly one empty bin, one bin has two balls and the other eight have one each. Choose the empty bin in 10 ways. Choose the two balls that share, in (102)=45\binom{10}{2} = 45 ways. Assign the 9 groups to 9 bins, in 9!9! ways. So

P=10×45×362 8801010=0.0163.P = \frac{10 \times 45 \times 362\,880}{10^{10}} = 0.0163.

A simulation confirms both figures. With 3.493.49 empty bins on average, having only one is rare, and that is what this small value says.

Classic wrong answer. Multiplying 0.3490.349 by the chance that the rest are full, as if the bins were independent. Filling nine bins with ten balls uses a precise count instead.

Question 29.8

In the dice game of craps, you roll two dice. A total of 7 or 11 wins at once, and a total of 2, 3 or 12 loses at once. Any other total becomes your point, and you then roll until the point appears again (you win) or a 7 appears (you lose). What is the probability of winning?

Answer

Answer to Question 29.8.

The probability is 244495≈0.493\frac{244}{495} \approx 0.493.

The first roll wins at once with chance 6+236=29\frac{6 + 2}{36} = \frac29.

For a point with ww ways of rolling it, only the point or a 7 matters on later rolls. So the point comes first with chance ww+6\frac{w}{w + 6}. The points 4 and 10 have w=3w = 3, 5 and 9 have w=4w = 4, and 6 and 8 have w=5w = 5. Thus

P=29+2(336⋅39+436⋅410+536⋅511).P = \frac29 + 2\left(\frac{3}{36} \cdot \frac39 + \frac{4}{36} \cdot \frac{4}{10} + \frac{5}{36} \cdot \frac{5}{11}\right).

The bracket is 136+245+25396\frac{1}{36} + \frac{2}{45} + \frac{25}{396}. Adding all this up gives 244495\frac{244}{495}. A simulation gives 0.4930.493. So the house edge is 1.4%1.4\% on an even-money bet.

Classic wrong answer. Using w36\frac{w}{36} for the point’s chance on the later rolls. Rolls that show neither the point nor a 7 do not count.

Question 29.9

You hold 10 assets in equal weights. Each has a volatility of 20%, and every pair has a correlation of 0.20.2. What is the volatility of the portfolio? What does it tend to as the number of assets grows?

Answer

Answer to Question 29.9.

The volatility is about 10.6%10.6\%, and the limit is about 8.9%8.9\%.

For nn equally weighted assets with variance σ2\sigma^2 and correlation ρ\rho,

σp2=σ2(1n+n−1nρ).\sigma_p^2 = \sigma^2\left(\frac{1}{n} + \frac{n - 1}{n}\rho\right).

With n=10n = 10, the bracket is 0.1+0.9×0.2=0.280.1 + 0.9 \times 0.2 = 0.28. So the variance is 0.04×0.28=0.01120.04 \times 0.28 = 0.0112, and the volatility is 0.0112=10.6%\sqrt{0.0112} = 10.6\%.

As nn grows, the bracket tends to ρ\rho, which gives 0.008=8.9%\sqrt{0.008} = 8.9\%. This is the risk that diversification cannot remove.

A check at the limits: ρ=1\rho = 1 gives 20%20\% whatever nn is, and ρ=0\rho = 0 gives 20%/10=6.3%20\%/\sqrt{10} = 6.3\%.

Classic wrong answer. Dividing by 10\sqrt{10} and stopping at 6.3%6.3\%, which needs independence. Most of the risk left comes from the common correlation.

Question 29.10

A stick of length 1 is cut at a uniform random point. Fix a point xx on the stick. What is the expected length of the piece that contains xx, as a function of xx? Give it at x=12x = \frac12 and x=14x = \frac14.

Answer

Answer to Question 29.10.

The expected length is 12+x−x2\frac12 + x - x^2, which is 34\frac34 at x=12x = \frac12 and 1116\frac{11}{16} at x=14x = \frac14.

If the cut UU falls left of xx, then the piece is (U,1)(U, 1), with length 1−U1 - U. If it falls right of xx, the piece is (0,U)(0, U), with length UU. So

E=∫0x(1−u) du+∫x1u du=x−x22+12−x22.\mathbb{E} = \int_0^x(1 - u)\,du + \int_x^1u\,du = x - \frac{x^2}{2} + \frac12 - \frac{x^2}{2}.

Limit check: at x=0x = 0, the piece always starts at 0, and its length UU has mean 12\frac12, which matches. A simulation gives the two values.

Note that the piece containing a fixed point is longer than an average piece, 12\frac12. This is length-biased sampling, which also underlies the inspection paradox.

Classic wrong answer. Answering 12\frac12 for all xx. The point is more likely to fall in the longer of the two pieces.

Question 29.11

A permutation of {1,…,10}\{1, \dots, 10\} is chosen at random. What is the distribution of the length of the cycle containing element 1, and what is its mean? What is the probability that elements 1 and 2 lie in the same cycle?

Answer

Answer to Question 29.11.

The length is uniform on 1,…,101, \dots, 10, with mean 5.55.5, and the probability is 12\frac12.

Follow element 1 under the permutation. It returns to itself on the first step with chance 110\frac{1}{10}. If it does not, it does so on the next step with chance 19\frac19, and so on. The chance of a length kk is

910⋅89⋯11−k12−k⋅111−k=110.\frac{9}{10} \cdot \frac89 \cdots \frac{11 - k}{12 - k} \cdot \frac{1}{11 - k} = \frac{1}{10}.

So it is uniform. Given a length LL, element 2 is among the other L−1L - 1 members of the cycle with chance L−19\frac{L - 1}{9}. Its mean over LL is 4.59=12\frac{4.5}{9} = \frac12.

A simulation agrees. A limit check: with n=2n = 2, the two elements are together only under the swap, which has chance 12\frac12. The value does not depend on nn.

Classic wrong answer. Assuming that long cycles are rarer for a given element. A permutation has more short cycles than long ones, but a long cycle holds many more elements, and the two effects balance exactly.

Question 29.12

You have a fair five-sided die, numbered 1 to 5. Design a way to simulate a fair seven-sided die, and find the expected number of rolls per output. What is the lower bound from information?

Answer

Answer to Question 29.12.

Roll twice, keep 21 of the 25 outcomes, and repeat otherwise. That costs 5021≈2.38\frac{50}{21} \approx 2.38 rolls per output, against a bound of log⁡57≈1.21\log_57 \approx 1.21.

Two rolls give 25 equally likely pairs. Give each of the 7 outputs three pairs, using 21 pairs, and start over on the other 4. Each output then has the same chance, so the result is fair.

Each attempt succeeds with chance 2125\frac{21}{25}, so the number of attempts is geometric with mean 2521\frac{25}{21}. Each attempt costs 2 rolls. A simulation returns 2.382.38.

Each output carries log⁡27\log_27 bits, and each roll log⁡25\log_25 bits, so no scheme can use fewer than log⁡57\log_57 rolls per output on average.

Classic wrong answer. Summing two rolls and reducing modulo 7. The sums are not equally likely, so the output is not fair, however it looks.

Follow-up. Can the 4 rejected outcomes be reused? Yes. They carry information: a rejected pair is a uniform draw from 4, which can seed the next attempt. This brings the cost closer to the bound.