本书暂未推出简体中文版。现有版本:English, Français。
Interviews I: Maths, Probability and Speed · 职业发展
30Timed Test 7
Take it in one sitting, without notes or a calculator.
Section A — 6 questions, 40 minutes
Question 30.1
You keep rolling a fair die. On average, how many rolls does it take to see both a 1 and a 2? What is it until you have seen all three even faces?
Answer
Answer to Question 30.1.
The first is 9 rolls, and the second is 11.
The wait splits into stages. At first, either of the 2 wanted faces will do, so the wait is . Then one face is left, and the wait is 6. The sum is 9.
For three faces, the stages are .
An exact recursion and a simulation agree. The last face takes more than half of the wait here. It takes the largest single share in any collecting problem, though less than half once you want four faces or more.
A second route for the first figure uses inclusion–exclusion on the maximum of two waits: , where 3 is the wait for the first of the two.
Classic wrong answer. Adding the separate waits, , which double-counts the rolls during which both faces are still missing.
Question 30.2
A coin with probability of heads is flipped 10 times. What is the probability of an even number of heads? You may use .
Answer
Answer to Question 30.2.
The probability is about .
Expand and . Adding them cancels the odd powers of , so
Limits: at the formula gives exactly , and at it gives 1, since 0 heads is even. As grows, it tends to for any strictly between 0 and 1. An exact binomial sum confirms the value.
The same result follows from a recursion: a parity bias of satisfies , with .
Classic wrong answer. Summing the even binomial terms by hand and stopping after a few, which is slow and stops short of the value: the terms for 0 and 2 heads give only .
Question 30.3
and each have variance 1, and their correlation is . What is the variance of ? What is the slope in a regression of on ?
Answer
Answer to Question 30.3.
The variance is 7, and the slope is .
Expanding,
The slope is . The covariance is , and the variance is . So the slope is .
There is a second route by symmetry. The slopes of and of on add up to 1, since regressed on itself has slope 1. And and have the same variance, so the two slopes are equal. That gives for any correlation. A simulation confirms it.
Classic wrong answer. Leaving a factor out of the cross term. It is , and an answer of 6 means that a factor of 2 was dropped.
Question 30.4
Two fair dice show and . What is the expected value of ?
Answer
Answer to Question 30.4.
The expected value is .
By symmetry, . The differences of 1, 2, 3, 4 and 5 have 10, 8, 6, 4 and 2 of the 36 outcomes. So
Half of this is . An enumeration of the 36 outcomes confirms it.
This is the value of a very small option: you receive the excess of one die over the other, and at the money it has a positive value even though .
Classic wrong answer. Answering 0, because has mean 0. The maximum drops the negative values, and so a mean of 0 gives no such shortcut.
Why it matters. It is the plain form of the point behind every option: convexity turns variance into value.
Question 30.5
Two fair dice are rolled. Given that at least one shows a 6, what is the probability that both do? If instead you know that the first die shows a 6, what is the probability that both do?
Answer
Answer to Question 30.5.
The first is , and the second is .
Out of the 36 outcomes, 11 have at least one 6, and only one has two. That gives .
If the first die is known, the other is independent, and the chance is .
The difference lies in what is known: “at least one” keeps 11 equally likely outcomes, and “this one” keeps 6. An enumeration gives the same.
Which reading applies depends on how the information came. If you asked someone “is there a 6?”, the first applies. If you saw one die, the second does. In practice, that step decides the answer, so it is worth asking aloud.
Classic wrong answer. Saying for both, on the grounds that the other die is independent. In the first case, there is no “other die” to point to.
Question 30.6
A 2 by 2 matrix has four entries, each independently 0 or 1 with equal probability. What is the probability that it is invertible over the real numbers?
Answer
Answer to Question 30.6.
The probability is .
The determinant is zero when . Each product is 1 in one case out of 4.
Both products are 0 in of the 16 matrices, and both are 1 in 1 more. So 10 matrices are singular, and 6 are invertible, which gives .
An enumeration of all 16 gives the same. Over the reals, the 6 are those with exactly one of the two products equal to 1. As the size grows, the chance of singularity for random binary matrices goes to 0, so this low chance is a small-size effect.
Classic wrong answer. Assuming that random matrices are almost always invertible. That holds for continuous entries. With binary entries, the coincidence is common.
Section B — 6 questions, 60 minutes
Question 30.7
A bag holds three coins: one fair, one with two heads, and one with heads probability . You draw one at random and flip it twice, getting two heads. What is the probability that the next flip of the same coin is a head?
Answer
Answer to Question 30.7.
The probability is .
The likelihoods of two heads are , 1 and . Multiplied by 16, they are 4, 16 and 9, for a total of 29. So the posterior weights are , and .
The next flip is a head with chance
A simulation agrees. Before any flips, the chance was . Two heads raise it to , a sensible move because evidence favours the two-headed coin but cannot rule the others out.
Classic wrong answer. Taking the most likely coin and answering 1. The posterior is a weighting of all three coins.
Follow-up. What if the two flips were H, T? The two-headed coin is out. The weights are and , so 4 and 3, and the next head has chance .
Question 30.8
A light bulb’s life is uniform on years. Each bulb is replaced as soon as it fails, and this has gone on for a long time. At a random moment, what is the expected age of the bulb in use? What is the expected total life of that bulb?
Answer
Answer to Question 30.8.
The expected age is , and the expected total life is .
A random moment is more likely to fall in a long life. A bulb with life is seen with weight proportional to . So the bulb in use has an expected life of
which is above the plain mean of 1.
Within that bulb’s life, the moment is uniform, so the expected age is half the life: . And the expected remaining life is also . A simulation of a long series of bulbs agrees.
Classic wrong answer. Answering 1 and . These use a typical bulb, but sampling at a random moment picks the longer ones.
Why it matters. The same effect makes a passenger wait longer than half of the average bus gap.
Question 30.9
is standard normal. Using and , find . A loss distribution is normal with mean 0 and volatility 1. Given the 99% quantile and , what is the expected shortfall at 99%?
Answer
Answer to Question 30.9.
, and the expected shortfall is about .
For a standard normal, , which gives . So
At , this is .
The expected shortfall is the same formula at the quantile: . It is only about above the value at risk here, as the tail thins fast. A fatter tail gives a larger gap. A numerical integral confirms both.
A check at : the formula gives , which is the mean of , as it should be.
Classic wrong answer. Dividing by the wrong tail, or quoting the quantile itself. The answer must be above , and that check catches the first error.
Question 30.10
A permutation of is chosen at random. An inversion is a pair of positions whose values are out of order. Find the mean number of inversions, and its variance.
Answer
Answer to Question 30.10.
The mean is 3, and the variance is .
Each of the pairs is out of order with chance . So the mean is 3.
For the variance, build the permutation by inserting elements in order. Element lands in one of positions, and adds a uniform number on of inversions, independent of the earlier ones. A uniform on has variance . So
An enumeration of the 24 permutations confirms it. The general result is . The insertion step removes all the covariances from the indicator route.
Classic wrong answer. Adding the pair variances, . The pairs that share a position are not independent.
Question 30.11
and are standard normals with correlation . What is ?
Answer
Answer to Question 30.11.
The expected value is .
Write . The first term has mean 0. The difference is normal with variance .
For a normal with variance , . So the mean of the maximum is . At , this is .
Limit checks: at , the two are equal and the maximum has mean 0. At , it is , the known value for two independent normals. A simulation returns .
Classic wrong answer. Scaling the independent answer by , which gives . The dependence runs through .
Question 30.12
You roll 100 fair dice. Estimate the probability that the sum is at least 380, given that one die has variance and that for a standard normal .
Answer
Answer to Question 30.12.
The probability is about .
The sum has mean 350 and variance , so its standard deviation is about .
With the continuity correction, the threshold is , and . So . The sum of 100 dice is close enough to normal at this level, and an exact convolution gives the same to within .
Without the correction, , and the tail is . For a quick answer, that is close enough, though the correction costs one extra step for the extra digit.
Classic wrong answer. Using a variance of 25, as for 100 coin flips. A die’s variance is near 3, which is a benchmark worth knowing.