How to calculate the expected value on the difference between failed and success coin tossing trials?

765 Views Asked by At

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.

1

There are 1 best solutions below

0
On BEST ANSWER

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.