3

Good day,

not long ago i solved similar problem for $X_1, X_2,...,X_n$ iid $U(\{1,..,N\})$ (discrete). But then i asked myself what if $X_i$ would be iid $U([0,1])$ (continuous) and realised that tricks i used for discrete calculations wouldn't work at all.

So let be $X$ and $Y$ independent random variables with continuous uniform distribution on [0,1]. $Z:=\max\{X,Y\}$. How to calculate $\mathbb{E}[X|Z]$?

To acquire $\mathbb{E}[X|Z=z]$ would be enough for calculating. And i know that \begin{align*} \mathbb{E}[X|Z=z]=\int x d\mathbb{P}^{X|Z=z} \end{align*} $\mathbb{P}^Z$ almost surely. Good, the problem reduces to finding out what $\mathbb{P}^{X|Z=z}$ is.

We know that $\mathbb{P}^{X|Z=z}$ has a lebesgue density $\frac{f(x,z)}{f^Z(z)}$.

Calculating of $f^Z(z)$ wasn't hard and i have $2z\mathbf{1}_{0\leq z\leq1}$, but i am clueless about $f(x,z)$.

i have read this post from Did Conditional expectation $E[X\mid\max(X,Y)]$ for $X$ and $Y$ independent and normal but i have no idea where the formula comes from.

If someone knows how to solve this problem please tell me.

3 Answers3

1

It seems to me that if you know the maximum, $Z$, of $X$ and $Y$, then there is a $.5$ chance that $X=Z$ (the probability of a tie is $0$ with the uniform distribution); and there is a $.5$ chance that $X<Z$--in this case, I think $X$ is uniformly distributed on $[0,Z]$. Thus $E[X|Z]=.5Z+.5\frac{Z}{2}=\frac{3Z}{4}$.

paw88789
  • 40,402
0

[under review]

Since you managed to calculate $f_Z$ correctly, let me compute $f_{X, Z}$.

First we find the corresponding cumulative distribution function

$$ F_{X, Z}(x,z)=\mathbb{P}(\{X \leq x, Z \leq z \}) = \mathbb{P}(\{X \leq x, X \leq z, Y \leq z\} ) $$ First consider the case when $z<x$, then we obtain that $$\begin{align} &\mathbb{P}(\{X \leq x, Z \leq z \}) \\=& P(\{X \leq z, Y \leq z\} )\\ &\text{now we use independence of } X \text{ and } Y\\ =& F_X(z)F_Y(z)\end{align} $$ Now assume that $x \leq z$, then $$\begin{align} &\mathbb{P}(\{X \leq x, Z \leq z \}) \\=&P(\{X \leq x, Y \leq z\} )\\ =& F_X(x)F_Y(z)\end{align}.$$ Thus $$f_{X, Z}(x, y) = \frac{\partial^2}{\partial x \partial z}F_{X, Z}(x,z) = \begin{cases} 0 & \text{if } z < x \\ \mathbf{1}_{(0,1)}(x,z) &\text{if } x \leq z\end{cases}.$$

Now as probably you know you can use the fact that $$f_X(X \mid Z=z) = \frac{f_{X, Z}(x, z)}{f_Z(z)}.$$

m_gnacik
  • 3,293
  • A cause of concern should be that the function you say is the density $f_{X,Z}$ has integral $\frac12$, not $1$. – Did Nov 13 '14 at 19:52
  • Yep, thanks I noticed that I made a mistake, it was a bad idea to do this in a rush, now I'm fixing it. – m_gnacik Nov 13 '14 at 20:00
  • good that we cleared the problem with the maximum. But now i have another problem :-)

    I had the same joint density calculated as you before, but i said i were clueless about it, because i couldn't explain following thing:

    \begin{align} F_Z(z)=\mathbb{P}(Z\leq z) =\mathbb{P}(X \leq z, Y \leq z) =\mathbb{P}(X\leq z)\mathbb{P}(Y\leq z)=z^2 \end{align}

    which implies that $f^Z(z)=2z$ on $0\leq z \leq 1$

    but if \begin{align} f_{X, Z}(x, z) =\mathbf{1}_{(0,1)}(x,z) &\text{if } x \leq z \end{align} is the joint density then why is \begin{align} \int f_{X, Z}(x, z) dx \neq f_Z(z) \end{align}

    – user191685 Nov 13 '14 at 20:38
  • This $f_{X,Z}$ is not a correct density (density has always integral $1$ this one has $\frac{1}{2}$). I will try to fix the problem, I'm sorry for the confusion. – m_gnacik Nov 13 '14 at 20:48
  • The problem is that $F_{X, Z}(x,z)$ is continuous but not differentiable at $x=z$. For example, the derivate with respect to $x$ is $0 $ in the first region and $f_X(x)F_Y(z)$ in the second, hence when you derive with respect to $z$ there is a discontinuity (and a Dirac delta, if you wish). – leonbloy Nov 13 '14 at 21:09
  • @leonbloy I know your solution for this problem is different. Do you think it is possible to solve this via density way? – user191685 Nov 13 '14 at 21:29
  • @user191685 : Totally, but this only makes sense if you want the joint density (you'll need to use Dirac deltas then, or stick with distribution functions). If one only want the expectation, this approach feels a little messy. – leonbloy Nov 13 '14 at 23:16
0

In your case, if you know the max is $Z=z$, then we have $E[X|Z=z]=P(X<z|Z=z)E[X|X<z,Z=z]+ zP(X=z|Z=z)$.

Now, the second term may seem strange, as $X,Y$ are continuous, however, the knowledge of $Z=z$ implies that $X$ or $Y$ or both are equal to $z$: $P(X=z|Z=z)+P(Y=z|Z=z)-P(X=z \cap Y=z|Z=z)=1$. By independence, we know that $P(X=z|Z=z)=P(Y=z|Z=z)$.

The third term is says both variables take on the maximum...in other words, they are equal. The probability that they are equal is intuitively $0$ (since the set $\{\{(x,y)|x=y)\}\cap [0,1]^2\}$ has Lebesgue measure $0$.

Therefore: $P(X=z|Z=z)+P(Y=z|Z=z)=1 \implies P(X=z|Z=z)=P(Y=z|Z=z)=\frac{1}{2}$ and we then know $P(X<z|Z=z)=1-P(X=z|Z=z)=\frac{1}{2}$

Thus,

$$E[X|Z=z]=\frac{1}{2}E[X|Z=z]+ \frac{z}{2}=\frac{z}{4}+\frac{z}{2}=\frac{3z}{4}$$

  • hi and thx for an answer. I still have some questions to your claim:

    why do we have a minus and not a plus here $P(X=z|Z=z)+P(Y=z|Z=z)-P(X=z \cap Y=z|Z=z)=1$

    and how do you know $E[X|Z=z]=\frac{z}{2}$?

    – user191685 Nov 13 '14 at 17:59
  • @user191685 $P(A \cup B)=P(A)+P(B)-P(A\cap B)$ Also, I didn't conclude that $E[X|Z=z]=\frac{z}{2}$ I said it equaled $\frac{3z}{4}$ –  Nov 13 '14 at 18:12
  • @user191685 we know that $P(X=z|Z=z)=P(Y=z|Z=z)$ from independence (hence they are exchangeable) –  Nov 13 '14 at 18:14
  • no idea how i forgot such formula, right. Sorry if i am bit slow, but last step is still unclear.

    $E[X|Z=z]=P(X<z|Z=z)E[X|X<z,Z=z]+ zP(X=z|Z=z)=\frac{1}{2} E[X|X<z,Z=z] + \frac{z}{2} $ fine so far, but why does this equal to $\frac{z}{4} + \frac{z}{2}$?

    – user191685 Nov 13 '14 at 18:28
  • @user191685 $E[X|X<z,Z=z]=\frac{z}{2}$ since $X$ will be uniformly distributed between $0$ and $z$ –  Nov 13 '14 at 18:44
  • well, then the proof is completed. But why is it so clear to you that $X$ will be uniformly distributed between $0$ and $z$? I don't see it. – user191685 Nov 13 '14 at 18:56
  • @user191685 its just a truncated uniform rv. You know it cannot be greater than z, so the conditional distribution distribution is just a truncated uniform. Since I've ruled out the possibility that $X=z$, it is simply the truncated uniform. The case where $X=z$ is treated in the second term. –  Nov 13 '14 at 19:05
  • @user191685 you can think of it this way. Uniformly choose an upper bound $U$ on [0,1]. Then, select X from the resulting truncated distribution. What is $P(X<U)$? Its $U$, hence, when you condition on $U$ all you're doing is dividing by $1-U$, which just scales up the density on $[0,U]$ –  Nov 13 '14 at 19:07
  • ok big thx, i understand your solution. Do you mind on joining the conversation above about maximum? – user191685 Nov 13 '14 at 19:23