Conditional expectation for discrete uniform distribution

339 Views Asked by At

Let $X$, $Y$ independent random variables each of one with discrete uniform distribution in $\{1,2,\cdots,N\}$, find $E[X|Y-X]$ and $E[Y|Y-X]$.

I know that $E[X|Y-X=a]=\sum_{x}\frac{xf_{X,Y-X}(x,a)}{f_{Y-X}(a)}$, but my problem is to find $f_{Y-X}(a)$ (I´m considering $a\in\{1-N,2-N,\cdots,N-2,N-1\}$.

Can you help me?

1

There are 1 best solutions below

0
On

Define the "reversed" random variables $X':=N+1-X$ and $Y':=N+1-Y$. Argue that (by listing the possibilities, or by drawing a picture), conditional on $Y-X$, the sum $Y'+X'$ has the same distribution as the sum $Y+X$. Conclude that $$E(Y+X\mid Y-X)=E(Y'+X'\mid Y-X).\tag1$$ But the RHS of (1) equals $2(N+1)-E(Y+X\mid Y-X)$, so we have $$E(Y+X\mid Y-X)=N+1\,.\tag2$$ And clearly $$E(Y-X\mid Y-X)=Y-X\,.\tag3$$ Finally, use linearity of conditional expectation to solve (2) and (3) for $$E(Y\mid Y-X) = \frac12\left[N+1+(Y-X)\right]$$ and $$E(X\mid Y-X) = \frac12\left[N+1-(Y-X)\right].$$