How to convert a $\Pr[X \neq Y]$ into an expectation?

74 Views Asked by At

Let $X,Y$ be discrete-valued random variables that can take on the value $1$ or $0$. Suppose that $Y$ takes on $1$ with probability $\mu$ and $0$ with probability $1 - \mu$.

We wish to show that the probability of $\Pr[X \neq Y]$ may be written in terms of expectation i.e. $\mathbf{E}(g(X,Y))$, where $g$ is some function.

Here is what I have tried: (By total probability theorem)

$\Pr[X \neq Y] = \Pr[X = 1 | Y = 0]\Pr[Y= 0] + \Pr[X = 0| Y = 1]\Pr[Y = 1]$

I did get a sum of terms, but it is clearly not granting my wish!

How should I approach this problem?

1

There are 1 best solutions below

0
On BEST ANSWER

We want $$g(X,Y) = 1(X\ne Y)=\left\{\begin{array}{ll}1&X\ne Y\\0& \text{otherwise}\end{array}\right.$$ since $P(A) = E(1_A)$ for any event $A.$

The form above fully specifies the function, but we can come up with other more arithmetical representations that work when $X$ and $Y$ are binary. The obvious choice is $$g(X,Y) = X + Y \text{ mod } 2,$$ but if you want something still more mundane, $g(X,Y) = (X-Y)^2$ will work.