0

Suppose I toss a coin $N$ times. I want to know which is $E[\left|X-Y\right|]$ where $X$ and $Y$ are random variables denoting number of success and failures respectively. Both variables can be considered Bernoulli trials.

What I'm planning to do is to use the Mean Absolute Difference as explained here with the usual probability for successes for a Bernoulli trial . Nonetheless, the formula is given for an unknown distribution, so I want to know if my approach is correct or if I there is a better formula to calculate this.

JPCF
  • 123
  • From the way I understand your question, isn't $Y$ equal to $N-X$? In this case, the expected value is easy to calculate. – Simeon Jan 05 '16 at 09:55
  • Yeah... that's true... so let $Z=N-X$. Now it is enough to calculate $E[\left|Z\right|]$ right? what would be the distribution in such case? – JPCF Jan 05 '16 at 09:57
  • 1
    What's $Z$ needed for? I mean that $E(|X-Y|) = E(|X-(N-X)|) = E(|2X-N|)$. Then you can condition on whether $2X-N$ is positive or not. – Simeon Jan 05 '16 at 10:01

1 Answers1

2

We have the equality $|X-Y|=N-2\min(X,Y)$ so that $\mathbb E|X-Y|=N-2\mathbb E\min(X,Y)$.

If the coin is fair then you can find a closed form here.

drhab
  • 153,781