The interview problem
For independent Uniform(0,1) samples, derive the distribution and mean of their maximum.
Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.
1. Scope and worked approach
Let M=max(X1,…,Xn). All n values must be at most m, so F_M(m)=m^n for 0≤m≤1. Differentiate for density nm^(n−1); integrating m times that density gives E[M]=n/(n+1).
2. Trace the design or derivation
Maximum event → product CDF → derivative → expected maximum
For Uniform(0,a), rescale the answer to E[M]=an/(n+1). Thus (n+1)M/n is unbiased for a under the exact model, but unbiasedness does not protect against a non-uniform sampling process or contaminated extremes.
3. Calculate the example
For n=4, E[M]=0.8 and P(M≤0.5)=0.5^4=0.0625. The mean maximum is not the midpoint of the distribution.
4. Failure cases and trade-offs
Dependence breaks the product of CDFs. Using a sample maximum as a hard physical upper bound ignores unseen values and sampling bias.
5. Validation, follow-ups and self-review
Check n=1 and n approaching infinity. Follow-up: derive the minimum by symmetry. Self-review: state support, independence and the CDF event.
Sources and related practice
Technical reference: docs.scipy.org — Uniform support; order-statistic derivation is original.
Source publication/update: Not established. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.
Continue with Interpret uncertainty and confidence intervals in model evaluation; Diagnose selection bias in logged recommendation data.
Continue your preparation
Choose a connected learning path or browse more ML fundamentals questions. Read our editorial method and attribution policy.