Buku ini belum tersedia dalam Bahasa Indonesia. Edisi: English, Français.
Interviews I: Maths, Probability and Speed · Karier
28Timed Test 5
Take it in one sitting, without notes or a calculator.
Section A — 6 questions, 40 minutes
Question 28.1
Events arrive as a Poisson process with rate 2 per hour. What are the mean and variance of the time of the third event? What is the probability that the third event arrives after one hour?
Answer
Answer to Question 28.1.
The mean is hours, the variance is , and the probability is .
The gaps are independent exponentials with mean and variance . The third arrival is the sum of three of them, a Gamma variable. So the mean is and the variance is .
The third arrival comes after one hour exactly when at most 2 events occur in that hour. The count is Poisson with mean 2, so
With , this gives . The mean of makes this plausible. A simulation agrees.
Classic wrong answer. Using a normal approximation with 3 terms, which gives about . The Gamma is skewed, and the exact route takes one line.
Question 28.2
You flip a fair coin until the first head, and let be the number of flips. Then you roll fair dice and add them up. Find the mean and the variance of the sum.
Answer
Answer to Question 28.2.
The mean is 7, and the variance is .
is geometric with mean 2 and variance 2. A die has mean and variance .
The law of total expectation gives .
The law of total variance gives
Most of the variance comes from not knowing how many dice there are. A simulation returns and .
Classic wrong answer. Using alone, or . The second term has the squared mean of , not its variance.
Question 28.3
A coin has an unknown probability of heads, with a uniform prior on . You see 3 heads in 4 flips. What is the posterior mean? What is the probability that the next two flips are both heads?
Answer
Answer to Question 28.3.
The posterior mean is , and the probability of two heads is .
The uniform prior is Beta, so after 3 heads and 1 tail the posterior is Beta. Its mean is .
The next two flips use the posterior of the posterior. The first head has chance . After it, the distribution is Beta, so the next head has chance . The product is .
Note that this exceeds . Uncertainty in the coin’s bias makes the two flips positively correlated. A numerical integral of over the posterior gives the same value.
Classic wrong answer. Squaring the posterior mean, which assumes that the bias is now known exactly. The difference is the posterior variance of .
Question 28.4
Five red and five blue balls are lined up in a random order. A run is a maximal block of one colour. What is the expected number of runs? What is the probability of exactly two runs?
Answer
Answer to Question 28.4.
The expected number is 6, and the probability of exactly two runs is .
The number of runs is 1 plus the number of neighbouring pairs of different colours. Take any one of the 9 neighbouring pairs. The chance that it has different colours is . So the mean is .
Exactly two runs means all the reds and then all the blues, or the reverse. That is 2 orders out of , so .
An enumeration of all 252 orders confirms both. It is more than the runs of 10 independent fair flips, since drawing without replacement makes a change of colour a little more likely.
Classic wrong answer. Using for each pair, as for independent flips, which gives . Having drawn a red, only 4 of the remaining 9 balls are red.
Question 28.5
Three fair dice are rolled. What is the probability that the product of the three numbers is divisible by 6?
Answer
Answer to Question 28.5.
The probability is .
The product is divisible by 6 when it has a factor of 2 and a factor of 3. Use the complement and inclusion–exclusion.
No factor of 2 means all dice odd: . No factor of 3 means no die showing 3 or 6: . Neither factor means all dice in : .
So the failure chance is , and the answer is . An enumeration confirms the count of 133.
Classic wrong answer. Multiplying the chances of having a factor of 2 and of having a factor of 3, as if independent. Both depend on the same dice: a 6 supplies both.
Question 28.6
and are independent standard normals. What is the chance that the point lies within radius 1 of the origin? What radius holds exactly half the probability?
Answer
Answer to Question 28.6.
The chance is , and the radius is .
has an exponential law with mean 2. In polar form, the density is , and so .
At : . For the median: gives .
Compare one dimension: a standard normal is inside with chance . Going to two dimensions drops this to . In a high dimension, the mass moves further out, a fact that matters for distance-based methods. A simulation agrees.
Follow-up. What is the mean radius? , the mean of a Rayleigh variable.
Section B — 6 questions, 60 minutes
Question 28.7
An election between A and B ends with 7 votes for A and 3 for B, counted in random order. What is the probability that A is strictly ahead throughout the count?
Answer
Answer to Question 28.7.
The probability is .
This is the ballot theorem. Count the bad orders. If the first vote is for B, the order is bad, and there are such orders. If the first vote is for A and the count is tied at some point, reflect the part before the first tie: this swaps A and B votes and gives a sequence starting with B. So that second group of bad orders matches the first group one-to-one.
The bad orders number out of . So the good ones have . An enumeration confirms this.
In the limits, a 3–3 count gives 0, as a tie at the end is forced, and a 7–0 count gives 1.
Classic wrong answer. Using the chance that A’s lead is positive at the end, which is 1 here, or simply A’s share of the votes, .
Question 28.8
In a random graph on 10 vertices, each edge is present independently with probability . Find the mean and the variance of the number of triangles.
Answer
Answer to Question 28.8.
The mean is 15, and the variance is .
There are possible triangles, each present with chance . So the mean is 15.
Each indicator has variance , for a total of .
Covariances: two triangles with no common edge are independent. Two sharing exactly one edge have five edges in total, so
Each triangle shares an edge with others, one for each edge and each of the 7 other vertices. So there are ordered pairs, adding .
The total is . A simulation gives and about . Note that the correlation adds exactly three times the independent variance.
Classic wrong answer. Stopping at , which treats triangles as independent. Sharing an edge is a positive dependence, which makes the count much more variable.
Question 28.9
Using , how many decimal digits does have, and what is its leading digit?
Answer
Answer to Question 28.9.
It has 302 digits, and the leading digit is 1.
. A number with base-10 logarithm between 301 and 302 has 302 digits.
The fractional part gives the leading digits: . Since , . So the number begins with 1.07, and the first digit is 1.
An exact computation with big integers gives 302 digits, starting 1071. Note that a small error in the logarithm’s fifth digit, multiplied by 1000, moves the fractional part by a hundredth, and that is why the digits given in the question are enough for the first digit and just about for the second.
Follow-up. How often is the first digit of equal to 1, in the long run? . The fractional parts of are equidistributed, which gives Benford’s law for this sequence.
Question 28.10
Bus line A arrives every 10 minutes and line B every 15 minutes, each on a fixed timetable, with independent uniform phases. You arrive at a random time and take the first bus. What is your expected wait?
Answer
Answer to Question 28.10.
The expected wait is minutes.
The waits are and . Then
Expanding the integrand as , the integral is . A simulation returns .
Checks: the wait must be below 5, the mean wait for A alone. The rule for Poisson lines with the same frequencies gives , which is much longer: regular buses are better than random ones.
Classic wrong answer. Giving 3, by combining the two mean waits as parallel rates of . The waits are uniform, not exponential.
Question 28.11
A game show has 5 doors, one with a prize. You choose a door. The host, who knows where the prize is, opens one other door with no prize behind it, and offers a switch. If you switch at random to one of the three remaining closed doors, what is your chance of winning?
Answer
Answer to Question 28.11.
Switching wins with probability , against for staying.
Your door has the prize with chance , and the host’s action does not change this: the host can always open a goat door. So the other four doors hold the prize with chance , and the host has shown that one of them does not. That is now spread across 3 doors.
So each closed door you did not choose has chance . The sum checks: .
A simulation with a random host gives . Switching is better by a third. With doors and one opened, the chance is . For , this is , the well-known case.
Classic wrong answer. Saying , with four closed doors treated as equally likely. Your own door is not like the others: the host was never allowed to open it, so the host’s choice says nothing about it.
Question 28.12
is binomial with 100 trials and success probability . Bound by Hoeffding’s inequality , with the excess over the mean. Compare the bound with Chebyshev’s inequality and the normal approximation.
Answer
Answer to Question 28.12.
Hoeffding gives , Chebyshev gives for the two-sided event, and the normal approximation gives about .
Here and , so . The bound is .
Chebyshev uses the variance of 25: . One tail is at most half of this if symmetry is used, .
The normal approximation with continuity correction uses , with tail . The exact binomial tail is .
So Chebyshev is off by a thousandfold, and Hoeffding by a factor of about 9, which is good for a bound with no assumption beyond boundedness. Each is valid: they only trade tightness for generality.
Classic wrong answer. Treating a bound as an estimate. An upper bound says what cannot happen, and it can be far from the true value.