পরিমাণগত অর্থায়ন · বই 18 · ক্যারিয়ার

Interviews I: Maths, Probability and Speed

এই বইটি এখনো বাংলা ভাষায় পাওয়া যায় না। সংস্করণ: English, Français।

Interviews I: Maths, Probability and Speed · ক্যারিয়ার

33Timed Test 10

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

Section A — 6 questions, 40 minutes

Question 33.1

XX, YY and ZZ are independent and uniform on [0,1][0, 1]. What is the probability that X+Y+ZX + Y + Z lies between 1 and 2?

Answer

Answer to Question 33.1.

The probability is 23\frac23.

The sum falls below 1 inside the corner simplex of the cube, which has volume 13!=16\frac{1}{3!} = \frac16. By the symmetry x→1−xx \to 1 - x for all three, the sum exceeds 2 with the same chance. So the middle has 1−26=231 - \frac26 = \frac23.

A simulation returns 0.6670.667. Here, the mean is 1.51.5 and the standard deviation is 12\frac12, so the interval runs one standard deviation either side, and 23\frac23 is close to the normal rule of thumb of 0.680.68.

Classic wrong answer. Treating the sum as uniform on [0,3][0, 3], which gives 13\frac13. Sums bunch towards the middle.

Question 33.2

Five different balls are thrown independently and at random into 3 bins. What is the probability that no bin is empty?

Answer

Answer to Question 33.2.

The probability is 5081≈0.617\frac{50}{81} \approx 0.617.

There are 35=2433^5 = 243 outcomes. Use inclusion–exclusion on the empty bins. With a given bin empty, there are 25=322^5 = 32 outcomes, and with two given bins empty, there is 1. So the outcomes with no empty bin are

243−3×32+3×1=150.243 - 3 \times 32 + 3 \times 1 = 150.

That gives 150243=5081\frac{150}{243} = \frac{50}{81}.

A second count uses the sizes: (3,1,1)(3, 1, 1) has 3×(53)×2=603 \times \binom53 \times 2 = 60 outcomes, and (2,2,1)(2, 2, 1) has 3×(52)(32)=903 \times \binom52\binom32 = 90. The total is 150. An enumeration agrees.

Classic wrong answer. Forgetting the last term and getting 147243\frac{147}{243}. The outcomes with two empty bins are subtracted twice each in the single-bin count, so they must be added back.

Question 33.3

A return has mean 10 and variance 4. Bound the probability of a deviation of at least 5 from the mean using Chebyshev’s inequality. What is the probability if the return is normal, given that P(Z>2.5)=0.0062P(Z > 2.5) = 0.0062?

Answer

Answer to Question 33.3.

Chebyshev gives at most 0.160.16, and the normal value is about 0.01240.0124.

Chebyshev says that P(∣X−μ∣≥a)≤σ2a2P(|X - \mu| \ge a) \le \frac{\sigma^2}{a^2}, which is 425=0.16\frac{4}{25} = 0.16.

For a normal, the deviation is 52=2.5\frac52 = 2.5 standard deviations. Both tails count: 2×0.0062=0.01242 \times 0.0062 = 0.0124. A simulation agrees.

The gap, of a factor of 13, is the cost of assuming nothing about the shape. And Chebyshev’s bound is attained by a three-point distribution, which puts all the deviation exactly at ±5\pm5. So it cannot be improved without an assumption.

Both are correct: only the first holds for any distribution with this variance, and this matters when a tail is fat.

Classic wrong answer. Using only one tail for the normal, 0.00620.0062. The question asks for a deviation in either direction.

Question 33.4

Three dice have these faces: A is (2, 2, 4, 4, 9, 9), B is (1, 1, 6, 6, 8, 8) and C is (3, 3, 5, 5, 7, 7). Each has the same total. What are the probabilities that A beats B, that B beats C, and that C beats A in a single roll against each other?

Answer

Answer to Question 33.4.

Each probability is 59\frac59.

Each die has three values, each with chance 13\frac13. So there are nine equally likely pairs.

A against B: 2 beats 1, 4 beats 1, and 9 beats all three. That is 1+1+3=51 + 1 + 3 = 5 pairs out of 9.

B against C: 6 beats 3 and 5, and 8 beats all three. That is 2+3=52 + 3 = 5.

C against A: 3 beats 2, 5 beats 2 and 4, and 7 beats 2 and 4. That is 1+2+2=51 + 2 + 2 = 5.

So A beats B, B beats C and C beats A. An enumeration gives the same. The relation “beats” is not transitive, although each die has the same mean of 5. So a choice made second always has the edge.

Classic wrong answer. Assuming that one die must be best, because a ranking looks natural. Ranking by one-on-one chance need not give an order.

Question 33.5

Two bus lines arrive as independent Poisson processes, with mean gaps of 10 and 20 minutes. You arrive at a random time and take the first bus. What is the probability of taking the first line? What is your expected wait?

Answer

Answer to Question 33.5.

The probability is 23\frac23, and the expected wait is 203≈6.67\frac{20}{3} \approx 6.67 minutes.

The rates are 110\frac{1}{10} and 120\frac{1}{20}. By the memoryless property, the wait for each is exponential, whatever has happened before you arrive. The first bus is on line A with chance 1/101/10+1/20=23\frac{1/10}{1/10 + 1/20} = \frac23.

The first arrival has rate 320\frac{3}{20}, so its mean is 203\frac{20}{3}. A simulation agrees.

Limit check: if line B is removed, its rate is 0, the chance is 1, and the wait is 10. So the wait is below the shorter gap, which makes sense.

The choice between lines and the waiting time are independent. So the wait is 203\frac{20}{3} whichever line you end up on.

Classic wrong answer. Taking half of each gap as the wait, which is right only for regular buses. A Poisson line has a mean wait equal to its whole mean gap.

Question 33.6

A year on another planet has 20 days, and birthdays are independent and uniform. What is the smallest group size for which the chance of a shared birthday exceeds 12\frac12?

Answer

Answer to Question 33.6.

The smallest group has 6 people.

The chance that all nn birthdays differ is ∏i=0n−1(1−i20)\prod_{i = 0}^{n - 1}(1 - \frac{i}{20}). At n=5n = 5, this is 20⋅19⋅18⋅17⋅16205=0.581\frac{20 \cdot 19 \cdot 18 \cdot 17 \cdot 16}{20^5} = 0.581. At n=6n = 6, it is 0.581×1520=0.4360.581 \times \frac{15}{20} = 0.436. So the chance of a match goes from 0.4190.419 to 0.5640.564, and it crosses 12\frac12 at 6.

The rule of thumb is 1.18d1.18\sqrt{d}: with d=20d = 20, it is 5.35.3, which rounds up to 6. An exact loop confirms it. The same rule gives 22.522.5 for 365 days, near the true 23.

Classic wrong answer. Answering 10, half the days, because half seems natural. Pairs grow as n2n^2, so the answer scales with the square root.

Section B — 6 questions, 60 minutes

Question 33.7

XX is uniform on [0,1][0, 1]. Given XX, YY is uniform on [0,X][0, X]. What is E[X∣Y=12]\mathbb{E}[X \mid Y = \frac12]? You may use ln⁡2=0.693\ln 2 = 0.693.

Answer

Answer to Question 33.7.

The expected value is 0.5ln⁡2≈0.721\frac{0.5}{\ln 2} \approx 0.721.

The joint density is 1x\frac1x for 0<y<x<10 < y < x < 1. So given Y=yY = y, the density of XX is proportional to 1x\frac1x on (y,1)(y, 1). The constant is −ln⁡y-\ln y. Then

E[X∣Y=y]=∫y11 dx−ln⁡y=1−y−ln⁡y.\mathbb{E}[X \mid Y = y] = \frac{\int_y^11\,dx}{-\ln y} = \frac{1 - y}{-\ln y}.

At y=12y = \frac12, this is 0.50.693=0.721\frac{0.5}{0.693} = 0.721.

Check: it lies between 12\frac12 and 1, as it must. As y→1y \to 1, the formula tends to 1. As y→0y \to 0, it tends to 0, which is correct, as a small YY points to a small XX. A simulation in a thin window around 12\frac12 agrees.

Classic wrong answer. Answering 34\frac34, the midpoint of the allowed range. The factor 1x\frac1x favours small XX, because a small XX puts more density at any given YY.

Question 33.8

Five fair dice are rolled. What is the probability that their total is at least 18? With six fair dice, what is the probability of a total of at least 21, given that 4 3324\,332 of the 46 65646\,656 outcomes total exactly 21?

Answer

Answer to Question 33.8.

With five dice the probability is exactly 12\frac12, and with six dice it is about 0.5460.546.

Replace each face xx by 7−x7 - x, which leaves every die’s law unchanged. With five dice, the total TT becomes 35−T35 - T, so TT and 35−T35 - T have the same law. Now T≥18T \ge 18 is the same event as 35−T≤1735 - T \le 17. So P(T≥18)=P(T≤17)P(T \ge 18) = P(T \le 17), and these two events cover everything, with no overlap. Each therefore has chance 12\frac12.

With six dice, TT and 42−T42 - T have the same law, and the centre, 21, is a possible total. So P(T>21)=P(T<21)P(T > 21) = P(T < 21), and

P(T≥21)=12+12P(T=21)=12+12⋅4 33246 656≈0.546.P(T \ge 21) = \frac12 + \frac12P(T = 21) = \frac12 + \frac12 \cdot \frac{4\,332}{46\,656} \approx 0.546.

Classic wrong answer. Giving 12\frac12 for six dice as well. Five dice have a centre of 17.517.5, which no total can equal, but six dice have a centre they can hit, and “at least” counts it.

Question 33.9

A stream has an unknown number of items. You keep one item in memory: the first at the start, and then you replace it by the ii-th item with probability 1i\frac1i. What is the chance that the third of 5 items is the one kept at the end? How do you change this to keep 2 items, and what is the chance for each item then?

Answer

Answer to Question 33.9.

The third item is kept with probability 15\frac15. For a sample of 2, keep each new item with chance 2i\frac2i, replacing one of the two at random, and each item then has chance 25\frac25.

The third item enters with chance 13\frac13. It survives the fourth with 34\frac34 and the fifth with 45\frac45. The product is 13⋅34⋅45=15\frac13 \cdot \frac34 \cdot \frac45 = \frac15.

The product telescopes for any ii and nn, so every item ends up with chance 1n\frac1n. You never need to know nn in advance.

For a sample of kk, item i>ki > k enters with chance ki\frac{k}{i}. Each later item jj removes it with chance kj⋅1k=1j\frac{k}{j} \cdot \frac1k = \frac1j, so it survives with j−1j\frac{j - 1}{j}. The product is kn\frac{k}{n}. A simulation confirms the uniform shares.

Classic wrong answer. Using a fixed chance per item, say 1100\frac{1}{100}. It needs the length, and it gives later items a better share.

Question 33.10

A five-card hand is dealt from a standard 52-card deck, for which there are 2 598 9602\,598\,960 possible hands. What is the probability of exactly three of a kind, meaning three cards of one rank and two other cards of two different other ranks?

Answer

Answer to Question 33.10.

The probability is about 0.02110.0211.

Choose the rank: 13. Choose its three suits: (43)=4\binom43 = 4. Choose the two other ranks: (122)=66\binom{12}{2} = 66. Choose a suit for each: 42=164^2 = 16. The count is

13×4×66×16=54 912,13 \times 4 \times 66 \times 16 = 54\,912,

out of the total, so 0.02110.0211.

An independent simulation returns the same value. Note that the two ranks must differ, and if they did not, the hand would be a full house.

Classic wrong answer. Using 49 choices for the fourth card and 48 for the fifth. This counts full houses, and it gives each hand twice.

Follow-up. What is the chance of a full house? 13×4×12×6=374413 \times 4 \times 12 \times 6 = 3744 hands, or 0.001440.00144. It is rarer, even though the description is similar.

Question 33.11

In 100 flips of a fair coin, what is the probability that the number of heads differs from 50 by at least 10? Use the normal approximation with a continuity correction, given that P(Z>1.9)=0.0287P(Z > 1.9) = 0.0287.

Answer

Answer to Question 33.11.

The probability is about 0.0570.057.

The count has mean 50 and standard deviation 5. We want H≤40H \le 40 or H≥60H \ge 60. The correction puts the edges at 40.540.5 and 59.559.5, each 1.91.9 standard deviations from the mean. Two tails give 2×0.0287=0.05742 \times 0.0287 = 0.0574.

An exact binomial sum gives 0.05690.0569, so the correction is very close. Without the correction, z=2z = 2, and the answer would be 0.04550.0455. This is off by a fifth, a large error for such a simple step.

A check against a known figure: two standard deviations hold about 95%95\%, so about 5%5\% lie beyond. A count that can fall exactly on the edge adds a little more.

Classic wrong answer. Using one tail only, which gives 0.0290.029, half of the answer. The question asks for a deviation either way.

Question 33.12

A stock is at 100. A European call with strike 105 and one year to expiry costs 10, and the interest rate is zero. What should a European put with the same strike and expiry cost? If it is quoted at 14, what trade locks in a profit, and how much?

Answer

Answer to Question 33.12.

The put should cost 15. At 14, buy the put and the stock, and sell the call, for a certain profit of 1.

Put–call parity says that C−P=S−KC - P = S - K at a zero rate. So P=C−S+K=10−100+105=15P = C - S + K = 10 - 100 + 105 = 15.

At 14, the put is too cheap. Buy the put, buy the stock and sell the call. The cost is 14+100−10=10414 + 100 - 10 = 104. At expiry, the stock plus the put minus the call is worth exactly K=105K = 105 in every case: if ST>105S_T > 105, the call is exercised against you at 105, and if ST<105S_T < 105, you exercise the put at 105. So the profit is 1, with no risk.

A check: at ST=90S_T = 90 and at ST=120S_T = 120, the position is worth 105.

Classic wrong answer. Selling the put, because it looks like a poor asset at 14. The rule is to buy what is cheap against its replication.