Two dice are rolled - calculate the conditional expectation of the lower value given the higher value I want to calculate $\mathbb{E}(X\vert Y=y)$ where $X$ corresponds to the lower value of the two rolled dice and Y to the the higher value.
Here is what I managed to do:
I know that $\mathbb{E}(X\vert Y=y) = \frac{\mathbb{E}(X[Y=y])}{\mathbb{P}(Y=y)}$.
Now let $X_1$ and $X_2$ correspond to the rolled dice. Then I can write $$X=min\{X_1,X_2\}~~~\text{and}~~~Y=max\{X_1,X_2\}.$$
And I calculated the probabilities for each for a given value:
$$\mathbb{P}(X=x)=\frac{13-2x}{36}$$
$$\mathbb{P}(Y=y)=\frac{2y-1}{36}$$ 
Now I want to calculate $\mathbb{P}(X[Y=y]=x)$ in order to get the result for $$\mathbb{E}(X[Y=y])=\sum\limits_{x=1}^y x \mathbb{P}(X[Y=y]=x).$$
The result I got was $\mathbb{P}(X[Y=y]=x)=\frac{(2y+1)-2x}{y^2}$ which gives me the following expression:
$$\mathbb{E}(X[Y=y]) = \frac{(y+1)(2y+1)}{6y}.$$
This leads to the endresult:
$$\mathbb{E}(X\vert Y=y) = \frac{6(y+1)(2y+1)}{y(2y-1)}.$$
I know that this result can't be right. For example $\mathbb{E}(X\vert Y=1)=12$ but should be $1$ because the lower value has to be $1$ if the higher value is $1$.
Can someone help me with this exercise? Where am I doing something wrong? To be clear I: I want not only to calculate the conditional expectation but also to deduce a formula which gives me the result for each $y$.
 A: You have only two dice.  The much easier way is to just list all possibilities.  Conditioned on $Y=y$, there are only $2y-1$ possibilities:
$$(\color{red}{1}, y), (\color{red}{2}, y), \dots, (\color{red}{y-1}, y), (\color{red}{y}, y), (y, \color{red}{y-1}), \dots, (y, \color{red}{2}), (y,\color{red}{1})$$
So 
$$E[X \mid Y=y] = {\color{red}{2(1 + 2 + \dots + (y-1)) + y} \over 2y-1} = {y(y-1) + y \over 2y-1} = {y^2 \over 2y-1}$$

In terms of "debugging" your approach, I assume the notation $[A]$ means the $\{0,1\}$-valued indicator variable for event $A$, right?  So the event $(X[Y=y] = x)$ is equivalent to $(X=x \cap Y=y)$, because 


*

*if $Y \neq y$, then $[Y=y] = 0$ and $X[Y=y] = 0 \neq x$

*if $X \neq x$, then also clearly $X[Y=y] \neq x$
So $P(X[Y=y] = x) = P(X=x \cap Y=y) = {1 \over 36}$ (if $x=y$) or ${2\over 36}$ (if $x < y$).  If you plug this correct value into the $E[X \mid Y=y] = \sum x P(X[Y=y] = x)$ formula you will get a similar summation as the red numerator above, and the same answer.
A: intended to be a comment but posting as "answer" since comments do not allow graphics (see corresponding comment in comment section)
running simulation (n=3000) here is what i get 

