```javascript
%%javascript
MathJax.Hub.Config({
    TeX: { equationNumbers: { autoNumber: "AMS" } }
});
```


    <IPython.core.display.Javascript object>


## Exercise 2.17 Expected value of the minimum
Suppose $X$, $Y$ are two points sampled independently and uniformly at random from the interval [0,1]. What is the expected location of the left most point?

### Introduction

In this question, we have two random variables $X$, $Y \sim\mathcal{U}(0, 1)$. We want to know the expected value of the leftmost point (i.e. the expected value of the minimum). Since $E[X] = E[Y] = \frac{1}{2}$, it is reasonable to assume that if we repeat this experiment several times, then $\max(X, Y)\gt\frac{1}{2}$, and $\min(X, Y)\lt\frac{1}{2}$. Let's check if this is true.

### Solution
Random variable:

$X\sim\mathcal{U}(0, 1)$, $Y\sim\mathcal{U}(0, 1)$

The minimum between the two random variables can be computed by the $\min$ function:

\begin{equation}
\min(x, y) = \frac{x + y - |x-y|}{2}
\end{equation}
Now, we just have to compute the expected value of this function.

\begin{equation}
\mathbb{E}[\min(x, y)] = \iint_0^1\min(x, y)p(x, y) dx dy
\end{equation}

Since $X$, $Y$ are independent, we can easily decompose the joint distribution of (2):

\begin{aligned}
\mathbb{E}[\min(x, y)] & = \iint_0^1\min(x, y)p(x)p(y) dxdy \\
& = \iint_0^1\min(x,y)dxdy\\
& = \iint_0^1\frac{x+y-|x-y|}{2}dxdy \\
& = \frac{1}{2}\iint_0^1x + y - |x-y|dxdy
\end{aligned}

For the final step, we have to decompose the double integral, in order to strip of the absolute value of the integrand.

\begin{aligned}
& \frac{1}{2}\int_0^1\left(\int_0^yx+y-(-x+y)dx + \int_y^1x+y-(x-y)dx\right)dy \\
= & \frac{1}{2}\int_0^1\left(x^2\left\vert_0^y + 2xy\right\vert_y^1\right)dy \\
= & \frac{1}{2}\int_0^1(y^2 + 2y - 2y^2) dy \\
= & \frac{1}{2}\left[-\frac{y^3}{3}\left\vert_0^1 + y^2\right\vert_0^1\right] \\
= & \frac{1}{3}
\end{aligned}

Therefore, the expectation of the leftmost variable is 1/3.

6f123b0d0eca3a2d1e6c994c826b6303ae0de8b4
ipynb
Jupyter Notebook
murphy-book/chapter02/q17.ipynb
yusueliu/murphy-book
71d62cc083a683fb861be1e5acb8eeb948b00c54
Apache-2.0
2019-03-25T22:22:23.000Z
2019-09-29T20:46:58.000Z
murphy-book/chapter02/q17.ipynb
yusueliu/murphy-book
71d62cc083a683fb861be1e5acb8eeb948b00c54
Apache-2.0
murphy-book/chapter02/q17.ipynb
yusueliu/murphy-book
71d62cc083a683fb861be1e5acb8eeb948b00c54
Apache-2.0
2021-12-24T01:14:12.000Z
2021-12-24T01:14:12.000Z
Qwen/Qwen-72B
1. YES
2. YES