Back to questions

**Say we have X ~ Uniform(0, 1) and Y ~ Uniform(0, 1) and the two are independent. What is the expected value of the minimum of X and Y?**

This is the same question as problem #18 in the Statistics Chapter of Ace the Data Science Interview!

Let Z = min(X, Y). Then we know the following:

$P(Z \le z) = P(\min(X, Y) \le z) = 1 - P(X > z, Y > z)$

For a uniform distribution, the following is true for a value of z between 0 and 1:

$P(X > z) = 1-z \space \text{ and } \space P(Y>z) = 1 - z$

Since X and Y are i.i.d. (independent and identically distributed), this yields: $P(Z \le z) = 1 - P(X > z, Y > z) = 1 - (1-z)^2$

Now we have the cumulative distribution function for z. We can get the probability density function by taking the derivative of the CDF to obtain the following: $f_Z(z)= 2(1-z)$

Then, solving for the expected value by taking the integral yields the following:

$E[Z] = \int_{0}^{1} zf_Z(z)dz = 2\int_{0}^{1} z(1-z)dz = 2\left(\frac{1}{2}-\frac{1}{3}\right) = \frac{1}{3}$