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

Interviews I: Maths, Probability and Speed

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

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

13Order Statistics

Working with the sorted values of a sample: maximum and median, spacings, the highest serial number seen, the second-highest bid, records. Ranks are the common thread, because the rank pattern of a sample does not depend on its distribution.

Question 13.1 ★ QR, QT, Trader, Analyst • any • junior

You draw nn independent uniform numbers on [0,1][0, 1]. What are the averages of the largest, of the smallest and of the range? Give the probability that the largest is below 0.90.9 when n=10n = 10.

Answer

Answer to Question 13.1.

The largest averages nn+1\frac{n}{n + 1}, the smallest 1n+1\frac{1}{n + 1} and the range n−1n+1\frac{n - 1}{n + 1}. For n=10n = 10, the largest is below 0.90.9 with probability 0.910≈0.3490.9^{10} \approx 0.349.

The nn points cut the interval into n+1n + 1 pieces, and these pieces are exchangeable, so each has mean 1n+1\frac{1}{n + 1}. The smallest is the first piece, the largest is everything except the last piece, and the range is everything except the two end pieces. The largest is below a value exactly when all nn are.

The case n=1n = 1 checks all three: the largest and smallest both average 12\tfrac12, and the range is 0.

Classic wrong answer. Giving 1−1n1 - \tfrac1n for the largest. That is the point below which a single draw falls with chance 1−1/n1 - 1/n, not the mean of the largest. It is close for large nn, and wrong for n=1n = 1.

Question 13.2 ★ QR, QT, DS, Analyst • any • junior

You draw three independent uniform numbers on [0,1][0, 1]. What is the density of their median? What are its mean and variance? Which estimates the centre of the distribution better, the median of the three or their average?

Answer

Answer to Question 13.2.

The density is 6x(1−x)6x(1 - x), the mean is 12\tfrac12 and the variance is 1/201/20. The average is better, with a variance of 1/361/36.

The median is near xx when one point is near xx, one below and one above. There are 3!3! ways of assigning those roles, which gives the density 6x(1−x)6x(1 - x). In general, the kk-th smallest of nn uniforms has a Beta(k,n−k+1)(k, n - k + 1) law, here Beta(2,2)(2, 2). By symmetry the mean is 12\tfrac12, and E[M2]=∫016x3(1−x) dx=3/10E[M^2] = \int_0^1 6x^3(1 - x)\,dx = 3/10, so the variance is 3/10−1/4=1/203/10 - 1/4 = 1/20.

The average of three has variance 112⋅3=1/36\frac{1}{12 \cdot 3} = 1/36, so the median is 1.81.8 times as variable.

Classic wrong answer. Saying the median is always the more robust choice, so it must be the better one. Robustness protects against outliers, and a uniform has none. On a distribution with hard edges, the extremes are the most informative values.

Question 13.3 ★ QR, QT, Trader, DS • any • junior

Desk A sends 10 orders and desk B sends 20, and all 30 latencies are independent draws from the same continuous distribution. What is the probability that the fastest order belongs to desk B? That the three fastest all belong to desk B? Does the answer depend on the distribution?

Answer

Answer to Question 13.3.

The fastest belongs to desk B with probability 2/32/3, and the three fastest all belong to it with probability (203)/(303)=57/203≈0.281\binom{20}{3}/\binom{30}{3} = 57/203 \approx 0.281. The distribution does not matter.

All 30 values come from one continuous distribution, so every ordering of them is equally likely. The labels A and B are therefore a random assignment of 10 and 20 positions in the sorted list. The chance that the first three positions all go to B is the chain 2030⋅1929⋅1828\tfrac{20}{30} \cdot \tfrac{19}{29} \cdot \tfrac{18}{28}.

This is what rank tests are based on. If the fastest three all came from one desk, you can compute that chance under “same distribution” with no model of latency at all.

Classic wrong answer. Cubing 2/32/3, which gives about 0.2960.296. That treats the positions as independent, when they are drawn without replacement.

Follow-up. What is the test that this leads to? The Mann–Whitney rank test: it sums the ranks of one group and compares them with the distribution of all possible assignments.

Question 13.4 ★★ QR, QT, DS, Analyst • any • junior

A batch of machines carries the serial numbers 1,2,…,N1, 2, \dots, N, with NN unknown. You see five different machines, picked at random, and the highest serial number among them is 60. Give an unbiased estimate of NN, and derive it. Why is twice the sample mean minus one a worse estimator, even though it is unbiased as well?

Answer

Answer to Question 13.4.

The unbiased estimate is 60⋅(1+15)−1=7160 \cdot (1 + \tfrac15) - 1 = 71. Twice the mean minus one has a variance 7/37/3 times as large, about 18218^2 against 12212^2 at N=71N = 71.

The highest of kk serial numbers has P(max⁡=x)=(x−1k−1)/(Nk)P(\max = x) = \binom{x - 1}{k - 1}/\binom{N}{k}, and summing gives E[max⁡]=k(N+1)/(k+1)E[\max] = k(N + 1)/(k + 1). So N=k+1kE[max⁡]−1N = \frac{k + 1}{k} E[\max] - 1, and replacing E[max⁡]E[\max] by what you saw gives an unbiased estimator.

There is a picture behind this. The kk numbers split 1,…,N1, \dots, N into k+1k + 1 gaps of the same average length. The numbers above the maximum are one gap, and the average of the kk gaps you can see is about m/km/k. So add that to mm.

The sample mean has mean (N+1)/2(N + 1)/2, so doubling it and taking off one is unbiased too, but the highest number carries all the information in the sample. Given the maximum, the other numbers are just uniform below it and say nothing more about NN. The mean rule ignores this, and with a sample 1,2,3,4,601, 2, 3, 4, 60 it gives 27, which is below a serial number you have actually seen.

Why it matters. Know which single number in a sample carries the information, and do not average it away. The same reasoning applies whenever a series has a hard edge, such as a position limit or a price floor.

Question 13.5 ★★ QR, QT, DS • any • junior

You have nn independent draws from a uniform on [0,θ][0, \theta]. Compare the variance of 2Xˉ2\bar{X} with the variance of n+1nmax⁡Xi\frac{n + 1}{n}\max X_i for n=10n = 10. Both are unbiased. Which multiple of the maximum has the smallest mean squared error, and what is it worth?

Answer

Answer to Question 13.5.

The variances are θ2/30\theta^2/30 and θ2/120\theta^2/120 for n=10n = 10, so the mean is 4 times as variable. The best multiple is n+2n+1max⁡Xi\frac{n + 2}{n + 1}\max X_i, with mean squared error θ2/(n+1)2\theta^2/(n + 1)^2, here θ2/121\theta^2/121 against θ2/120\theta^2/120.

Take θ=1\theta = 1. The mean has variance 112n\frac{1}{12n}, so 2Xˉ2\bar{X} has variance 13n\frac{1}{3n}. The maximum has E[M]=nn+1E[M] = \frac{n}{n + 1} and E[M2]=nn+2E[M^2] = \frac{n}{n + 2}, so Var(M)=n(n+1)2(n+2)\mathrm{Var}(M) = \frac{n}{(n + 1)^2(n + 2)}, and the scaled maximum has variance 1n(n+2)\frac{1}{n(n + 2)}. The ratio is (n+2)/3(n + 2)/3.

Note the rates: 1/n1/n for the mean against 1/n21/n^2 for the maximum. An edge of a distribution is learned far faster than its centre.

For cMcM, the mean squared error is c2nn+2−2cnn+1+1c^2 \frac{n}{n + 2} - 2c \frac{n}{n + 1} + 1, a parabola in cc with its minimum at c=n+2n+1c = \frac{n + 2}{n + 1}. This accepts a small bias for a lower variance, but the gain is tiny, 1/1211/121 against 1/1201/120. The raw maximum, the maximum-likelihood estimate, has error 2(n+1)(n+2)=1/66\frac{2}{(n + 1)(n + 2)} = 1/66, nearly twice as much.

Classic wrong answer. Saying the maximum-likelihood estimate is the best because it usually is. Here it is biased low by construction, as it can never exceed the true θ\theta.

Question 13.6 ★★ QR, QT, Trader, Analyst • market maker, hedge fund • junior

Five bids are independent and uniform on [0,1][0, 1]. What is the average of the second-highest bid? If you are told that the highest bid is 0.80.8, what is the average of the second-highest then? Separately, you roll four fair dice: what is the average of the second-highest number shown?

Answer

Answer to Question 13.6.

The second-highest of five bids averages 2/32/3. Given that the highest is 0.80.8, it averages 0.640.64. The second-highest of four dice averages 5313/1296≈4.105313/1296 \approx 4.10.

From the gaps: the second-highest is everything except the top two of the six equal-mean pieces, so its mean is 4/64/6.

Given the highest is hh, the other four are independent uniforms on [0,h][0, h], and the second-highest is the largest of them, with mean 45h\tfrac45 h. At h=0.8h = 0.8 that is 0.640.64. As a check on the two answers, the highest has density 5h45h^4, and averaging 45h\tfrac45 h over that gives 45⋅56=23\tfrac45 \cdot \tfrac56 = \tfrac23.

For the dice, use the tail sum. The second-highest is at least kk when at least two of the four dice are, so with p=(7−k)/6p = (7 - k)/6,

P(second≥k)=1−(1−p)4−4p(1−p)3,P(\text{second} \ge k) = 1 - (1 - p)^4 - 4p(1 - p)^3,

and adding this for k=1,…,6k = 1, \dots, 6 gives 5313/12965313/1296.

Classic wrong answer. Using the uniform result for the dice, taking 1+5⋅35=41 + 5 \cdot \tfrac35 = 4. A die is not a rescaled uniform, and ties make the answer slightly different.

Why it matters. In a second-price auction the winner pays the second-highest value, so this average is the seller’s revenue. Knowing the top bid changes it, because the others are then bounded by it.

Question 13.7 ★★ QR, QT, DS, Risk • any • junior

For a large sample from a normal distribution, how much more variable is the sample median than the sample mean? What is the same comparison for the Laplace distribution, with density 12e−∣x∣\frac12 e^{-|x|}? What does this suggest for fat-tailed returns?

Answer

Answer to Question 13.7.

For a normal sample the variance of the median is π/2≈1.57\pi/2 \approx 1.57 times that of the mean. For the Laplace it is half that of the mean. So with fat enough tails the median wins.

The sample median has asymptotic variance 14nf(m)2\frac{1}{4 n f(m)^2}, with f(m)f(m) the density at the true median. The reason is that around the median, the count of points below a level is binomial with variance n/4n/4, and the slope of the expected count is nf(m)n f(m); dividing gives the error in position.

Standard normal: f(0)=1/2πf(0) = 1/\sqrt{2\pi}, so the variance is π2n\frac{\pi}{2n}, against 1n\frac1n for the mean.

Laplace: f(0)=12f(0) = \tfrac12, so the variance is 1n\frac1n, while the mean has variance 2n\frac2n.

Classic wrong answer. Saying the median is always less efficient because it “throws data away”. It depends on the density at the centre compared with the tails. A peak at the centre and fat tails favour the median.

Follow-up. And at the extreme of fat tails? For a Cauchy sample the mean is no better than one draw, whatever nn is, while the median has variance π24n\frac{\pi^2}{4n}. Real returns sit between the normal and these cases, which is why a trimmed mean or a median of a daily series is worth computing beside the mean.

Question 13.8 ★★ QR, QT, Risk, QD • any • junior

Five servers fail after independent exponential times with mean one year. When, on average, does the first fail? The third? The last? Are the time of the first failure and the time from the first failure to the last independent?

Answer

Answer to Question 13.8.

The first fails after 1/51/5 of a year on average, the third after 47/6047/60, the last after 137/60137/60. The time of the first failure and the time from it to the last are independent.

Five running servers fail at a total rate of 5, so the first failure takes 1/51/5 on average. By lack of memory, the remaining four then start afresh, with rate 4, and so on. So the sorted times are sums of independent gaps with means 15,14,13,12,1\tfrac15, \tfrac14, \tfrac13, \tfrac12, 1.

The third is 15+14+13\tfrac15 + \tfrac14 + \tfrac13, and the last is the sum of all five. The time from first to last is a sum of the other four gaps, so it is independent of the first, with mean 25/1225/12.

This independence is a special property of exponentials. In a uniform sample, a large minimum leaves little room, so the minimum and the range are strongly negatively correlated. A simulation finds about zero correlation for the exponentials, and below −0.3-0.3 for uniforms.

Classic wrong answer. Using one year for the last, the mean of a single lifetime. The last of five has to outlive the others, and that takes more than twice as long.

Why it matters. This is the standard picture for hardware failures with redundancy. With three replicas the time until the last is lost grows only slowly with redundancy, as a harmonic sum, unless you repair in between.

Question 13.9 ★★ QR, QT, DS • any • junior

You draw independent numbers from a continuous distribution until one beats your first draw. Let NN be the number of further draws you need. What is P(N>n)P(N > n)? What is the smallest nn with P(N≤n)≥12P(N \le n) \ge \frac12, and what is the mean of NN? Are the events “draw 5 is a record” and “draw 10 is a record” independent?

Answer

Answer to Question 13.9.

P(N>n)=1n+1P(N > n) = \frac{1}{n + 1}. The smallest nn with P(N≤n)≥12P(N \le n) \ge \frac12 is 1, and the mean is infinite. The record events are independent.

N>nN > n means that the first draw is the largest of the first n+1n + 1. All orderings are equally likely, so each of the n+1n + 1 draws is the largest with the same chance.

P(N≤1)=12P(N \le 1) = \tfrac12 exactly, and P(N≤0)=0P(N \le 0) = 0, so the smallest such nn is 1. The median is not unique, because P(N≥2)=12P(N \ge 2) = \tfrac12 as well: every number from 1 to 2 is a median. The mean is the sum of the tail probabilities, ∑n≥01n+1\sum_{n \ge 0} \frac{1}{n + 1}, which diverges. If the first draw happens to be large, the wait is very long, and those rare cases dominate the average.

For the records: draw kk being a record is a statement about where the largest of the first kk lies. The relative order of the first 9 draws, in particular where the largest of the first 5 stands, is independent of whether draw 10 beats them all. So the chance of both is 15⋅110=150\tfrac15 \cdot \tfrac{1}{10} = \tfrac{1}{50}, which a simulation confirms.

Classic wrong answer. Saying that the average wait must be finite because you nearly always finish after a few draws. The chance of a long wait falls too slowly, like 1/n1/n, for the sum to converge.

Why it matters. In a series of independent draws, a new all-time high gets rarer and rarer. A long run with no new high is expected under that model, and it says nothing on its own about a change.

Question 13.10 ★★ QR, QT, DS, Risk • any • junior

You have 10 independent draws from an unknown continuous distribution. What is the probability that its true median lies between the smallest and the largest draw? Between the third smallest and the third largest? Why can you say this with no knowledge of the distribution?

Answer

Answer to Question 13.10.

Between the smallest and the largest: 1−2⋅2−10=511/512≈0.9981 - 2 \cdot 2^{-10} = 511/512 \approx 0.998. Between the third smallest and the third largest: 912/1024≈0.891912/1024 \approx 0.891.

Each draw is below the true median with probability exactly 12\tfrac12, whatever the distribution. So the number BB of draws below the median is binomial with n=10n = 10 and p=12p = \tfrac12.

The median exceeds the smallest draw unless B=0B = 0, and it is below the largest unless B=10B = 10, which gives the first answer. The median lies between the third smallest and third largest exactly when at least 3 draws are below it, and at least 3 above it, which means 3≤B≤73 \le B \le 7:

(103)+(104)+(105)+(106)+(107)210=120+210+252+210+1201024=9121024.\frac{\binom{10}{3} + \binom{10}{4} + \binom{10}{5} + \binom{10}{6} + \binom{10}{7}}{2^{10}} = \frac{120 + 210 + 252 + 210 + 120}{1024} = \frac{912}{1024}.

A simulation with exponential and normal draws gives the same two numbers.

Classic wrong answer. Using a normal interval on the sample, Xˉ±2s/n\bar{X} \pm 2s/\sqrt{n}. It needs assumptions you have not got. For a median, the binomial count gives an exact interval.

Follow-up. Does this work for the mean? No. A distribution can have the same median with any mean you like, because of a far-away small probability. No interval made from a finite sample can cover the mean under every distribution.

Question 13.11 ★★★ QR, QT, DS • hedge fund, market maker • junior, experienced

A researcher backtests 1000 independent strategies, all with a true Sharpe ratio of 0. Each measured annual Sharpe ratio is normal, centred on 0, with a standard deviation of 1/31/3, which corresponds to 9 years of data. About what is the best measured Sharpe ratio, working without a table? How does the expected best grow with the number of strategies tried?

Answer

Answer to Question 13.11.

The best measured Sharpe ratio is about 1.081.08, since the largest of 1000 standard normals averages about 3.243.24. The expected best grows like 2ln⁡n\sqrt{2 \ln n}, very slowly.

Hand estimate: the largest of nn sits near the level exceeded with chance 1/n1/n. Here that is 1/10001/1000, which is 3.093.09 standard deviations, and using the median of the maximum, with tail ln⁡2/n\ln 2/n, it is 3.23.2. Multiply by 13\tfrac13, and you get about 1.071.07. The exact mean, from ∫x nϕ(x)Φ(x)n−1dx\int x\, n\phi(x)\Phi(x)^{n - 1}dx, is 3.243.24, which a simulation matches.

The formula 2ln⁡1000≈3.72\sqrt{2 \ln 1000} \approx 3.72 has the right growth, but it is too high by half a standard deviation at this size. Going from 100 to 1000 strategies, or from 1000 to 10 000, adds only about 0.60.6 to 0.70.7 standard deviation.

With one strategy there is no selection, and the expected best is 0.

Classic wrong answer. Saying that 1.08 over nine years is too high to be luck, because its tt-statistic is above 3. That test is for one strategy chosen in advance. After 1000 tries you should expect that value when no strategy has any skill.

Why it matters. This is the first question to ask of a backtest: how many things were tried? A corrected hurdle needs the number of trials, and the true number includes the attempts nobody wrote down.

Question 13.12 ★★★ QR, QT, Risk, DS • any • junior, experienced

You draw nn independent uniform numbers on [0,1][0, 1]. Find the distribution of the range. How large must nn be for the probability to be at least 95% that the range covers at least 90% of the interval? What can you then say, with the same nn, about any continuous distribution?

Answer

Answer to Question 13.12.

P(R<r)=nrn−1−(n−1)rnP(R < r) = n r^{n - 1} - (n - 1) r^n, and you need n=46n = 46 draws, where the chance of falling short is 0.0480.048 (against 0.0520.052 for n=45n = 45). For any continuous distribution, with 95% confidence, at least 90% of the distribution lies between the smallest and largest of 46 draws.

Take the range below rr. Say the smallest point is the one at xx, chosen in nn ways, and then the other n−1n - 1 must lie in [x,x+r][x, x + r]. For x≤1−rx \le 1 - r this has chance rn−1r^{n - 1}, and for xx above that, the chance is (1−x)n−1(1 - x)^{n - 1}. So

P(R<r)=n∫01−rrn−1dx+n∫1−r1(1−x)n−1dx=nrn−1(1−r)+rn,P(R < r) = n\int_0^{1 - r} r^{n - 1}dx + n\int_{1 - r}^1 (1 - x)^{n - 1} dx = n r^{n - 1}(1 - r) + r^n,

which is the formula. A check: for n=2n = 2, it gives 2r−r22r - r^2, which matches ∣X−Y∣|X - Y|.

For a general distribution with cumulative function FF, the values F(Xi)F(X_i) are uniform. The mass between the smallest and largest sample is exactly the uniform range F(max⁡)−F(min⁡)F(\max) - F(\min), so the result holds with no assumption.

Classic wrong answer. Solving 0.9n=0.050.9^n = 0.05, which gives n=29n = 29. That is right for one-sided cover, with only the maximum. Covering both ends takes more draws.

Why it matters. This gives a stress band with no model: 46 observed days bound 90% of the distribution with 95% confidence, whatever the returns look like, so long as the days are independent and from one distribution. They are often neither.

Question 13.13 ★★★ QR, QT, DS • hedge fund • junior, experienced

A sample of size 11 comes from a uniform on [θ,θ+1][\theta, \theta + 1], with θ\theta unknown. Compare three estimators of the centre: the sample mean, the sample median and the midrange, which is the average of the smallest and largest. Give the three variances. Why does the midrange win here, and at what rate does its variance fall as the sample grows?

Answer

Answer to Question 13.13.

The variances are 1/1321/132 for the mean, 1/521/52 for the median and 1/3121/312 for the midrange. The midrange wins, and its variance falls like 1/n21/n^2.

For the mean, the variance is 112n\frac{1}{12n}. The median of n=2k+1n = 2k + 1 uniforms has a Beta(k+1,k+1)(k + 1, k + 1) law, with variance 14(n+2)\frac{1}{4(n + 2)}, here 1/521/52. For the midrange, the maximum and minimum have the same variance n(n+1)2(n+2)\frac{n}{(n + 1)^2(n + 2)} and covariance 1(n+1)2(n+2)\frac{1}{(n + 1)^2(n + 2)}, so

Var(max⁡+min⁡2)=12⋅n+1(n+1)2(n+2)=12(n+1)(n+2).\mathrm{Var}\Bigl(\frac{\max + \min}{2}\Bigr) = \frac{1}{2} \cdot \frac{n + 1}{(n + 1)^2(n + 2)} = \frac{1}{2(n + 1)(n + 2)}.

A simulation matches all three within 1%. For n=1n = 1 all three coincide, at 1/121/12, which is another check.

The midrange wins because the density has hard edges and is flat inside. The likelihood depends only on the two extremes, so given them, the rest of the points have no further information on θ\theta. The median is worst, because it only uses local information, at a place with no special feature.

Classic wrong answer. Recommending the midrange in general. It is the worst choice with fat tails, and on a normal sample its variance is already above the mean’s. A simulation at n=11n = 11 shows it more than 1.51.5 times higher. An estimator suits a shape, and there is no universally good one.

Question 13.14 ★★★ QR, QT, LLE, QD • market maker, crypto • junior, experienced

Ten orders arrive at independent uniform times within one second. What is the probability that no two of them are within 10 milliseconds of each other? What is the average of the smallest gap between neighbouring orders?

Answer

Answer to Question 13.14.

No two are within 10 ms with probability 0.9110≈0.3890.91^{10} \approx 0.389. The smallest gap averages 1n2−1=1/99\frac{1}{n^2 - 1} = 1/99 of a second, about 10.110.1 ms.

The direct route is a shrinking argument. Give the points in sorted order x1<⋯<xnx_1 < \dots < x_n, all with gaps at least dd. Take yi=xi−(i−1)dy_i = x_i - (i - 1)d. This is a one-to-one map from such sets to sorted sets of nn points in [0,1−(n−1)d][0, 1 - (n - 1)d], and it preserves volume. So the chance that all gaps are at least dd is

(1−(n−1)d)n,\bigl(1 - (n - 1)d\bigr)^n,

here (1−9⋅0.01)10(1 - 9 \cdot 0.01)^{10}. The formula gives 1 at d=0d = 0 and 0 when d=1/(n−1)d = 1/(n - 1), when the points cannot fit any more.

The mean of the smallest gap is the integral of that tail, ∫01/(n−1)(1−(n−1)t)ndt=1(n−1)(n+1)\int_0^{1/(n - 1)} (1 - (n - 1)t)^n dt = \frac{1}{(n - 1)(n + 1)}. So a chance of about 0.390.39 at a distance of 10 ms sits beside a mean of about 10 ms, and this is a law with a long upper tail.

Classic wrong answer. Giving (1−0.02)45≈0.40(1 - 0.02)^{45} \approx 0.40, by treating the 45 pairs as independent, each with chance 2d2d of being close. It is an approximation for rare events, and it comes out near the exact value, but here the pairs are not independent, and it would fail for a larger dd.

Why it matters. Bursts occur at random. Ten orders in a second will come within 10 ms of each other more often than not, so a matching engine or a risk check has to be designed for that, even if the average gap is 100 ms.

Question 13.15 ★★★★ QR, QT • hedge fund, market maker • experienced

Find, in closed form, the average of the largest of three independent standard normal variables, and then the average of the largest of four. Your method should not need numerical integration. How far does the same method go, and what stops it?

Answer

Answer to Question 13.15.

The largest of three averages 32π≈0.846\frac{3}{2\sqrt{\pi}} \approx 0.846, and the largest of four averages 32π(1+2πarcsin⁡13)≈1.029\frac{3}{2\sqrt{\pi}}\bigl(1 + \frac{2}{\pi} \arcsin\frac13\bigr) \approx 1.029. The method goes up to five (about 1.1631.163), and six would need the chance that four correlated normals are all positive, for which there is no simple formula.

Start with En=n∫xϕ(x)Φ(x)n−1dxE_n = n\int x\phi(x)\Phi(x)^{n - 1}dx. Since xϕ=−ϕ′x\phi = -\phi', integrate by parts:

En=n(n−1)∫ϕ(x)2 Φ(x)n−2dx.E_n = n(n - 1) \int \phi(x)^2\, \Phi(x)^{n - 2} dx.

Now, ϕ(x)2=12π\phi(x)^2 = \frac{1}{2\sqrt{\pi}} times the density of W∼N(0,12)W \sim N(0, \tfrac12). So

En=n(n−1)2π E[Φ(W)n−2],E_n = \frac{n(n - 1)}{2\sqrt{\pi}}\, E\bigl[\Phi(W)^{n - 2}\bigr],

and Φ(W)n−2\Phi(W)^{n - 2} is the chance that n−2n - 2 new independent standard normals AiA_i are all below WW. The differences Ai−WA_i - W have variance 32\tfrac32, and any two of them have covariance 12\tfrac12, so correlation 13\tfrac13. The chance that they are all negative is an orthant probability.

For n=3n = 3: one variable, chance 12\tfrac12, so E3=62π⋅12E_3 = \frac{6}{2\sqrt{\pi}} \cdot \tfrac12.

For n=4n = 4: two variables, chance 14+12πarcsin⁡13\tfrac14 + \frac{1}{2\pi}\arcsin\frac13, and multiplying by 122π\frac{12}{2\sqrt{\pi}} gives the stated formula.

For n=5n = 5: three variables, chance 18+34πarcsin⁡13\tfrac18 + \frac{3}{4\pi}\arcsin\frac13, so E5=54π(1+6πarcsin⁡13)E_5 = \frac{5}{4\sqrt{\pi}}\bigl(1 + \frac{6}{\pi}\arcsin\frac13\bigr). All three match a numerical integral to nine decimals.

A second route for n=3n = 3 uses no integrals at all. The three pairwise distances add up to twice the range. Each has mean 2/π2/\sqrt{\pi}, so the range has mean 3/π3/\sqrt{\pi}, and the largest has half of that, because the smallest has the same size with the sign changed.

Classic wrong answer. Using 2ln⁡n\sqrt{2 \ln n}, which gives 1.481.48 for n=3n = 3. It is an asymptotic growth rate, and it is far from correct at small nn. A quant should know the small values: 0.560.56, 0.850.85, 1.031.03, 1.161.16 for n=2n = 2 to 55.