I want to calculate the expected value of an indicator variable. The problem is of the form: $$\mathbb{E}\left(\mathbf{1}[f(x_{a})>f(x_{b})]\right)$$ where $f(\cdot)$ is some function. I have no idea to proceed. Any help is greatly appreciated. Thanks!
-
5$\begingroup$ Hint: An indicator function = 1 if its argument is true, and = 0 if its argument if false. So what is the expected value of an indicator function? $\endgroup$– Mark L. StoneCommented Nov 19, 2015 at 16:27
-
$\begingroup$ +1 @MarkL.Stone Yes, thinking about what the indicator function is doing is the key here. [It might help initially to think of an indicator over a discrete variable.] $\endgroup$– Glen_bCommented Nov 20, 2015 at 0:16
2 Answers
Wikipedia has a very simple formula for the expected value of an indicator function. But applied to your problem,
$$\mathbb{E}\left(\mathbf{1}[f(x_{a})>f(x_{b})]\right)=\int\mathbf{1}[f(x_{a})>f(x_{b})]d\mathbb{P}=Pr(f(x_{a})>f(x_{b}))$$
-
2$\begingroup$ I had a professor who called this the "fundamental bridge" of probability. $\endgroup$ Commented Nov 19, 2015 at 16:49
-
I think I can answer my question after giving it some thought. It should be:$$\mathbb{E}\mathbf{1}[(f(x_{a})>f(x_{b})]=[1\mathbf{Pr}(f(x_{a})>f(x_{b})+0\mathbf{Pr}(f(x_{a})\leq f(x_{b})]=\mathbf{Pr}(f(x_{a})>f(x_{b})]$$