0
$\begingroup$

Suppose $X$ is a discrete random variable. Now, if some function $g(X)$ is a measurable function, then $g(X)$ is also a discrete random variable. In this case, we define the Expectation of the discrete random variable $g(X)$ in terms of $p_X(x)$ as $$ E[g(X)] = \sum_{x : p_X(x) > 0} x \cdot p_X(x)$$

Suppose $X$ is a continuous random variable. Now, if some continuous function $g(X)$ is a measurable function, then $g(X)$ is also a continuous random variable. In this case, we define the Expectation of the continuous random variable $g(X)$ in terms of $f_X(x)$ as $$ E[g(X)] = \int_{-\infty}^{+\infty} x \cdot f_X(x) dx$$

Now, suppose $X$ is a continuous random variable and if a function $g(X)$ is a measurable function, then $g(X)$ is also a random variable. If $g(\cdot)$ is a discrete function i.e. if $g(X)$ is a discrete random variable, then how is expectation of $g(X)$ defined in terms of $f_X(x)$?

$\endgroup$
  • 3
    $\begingroup$ This is called the "law of the unconscious statistician": $E[g(X)]=\int_{-\infty}^\infty g(x) f_X(x) dx$. The fact that $g$ takes on discrete values doesn't change anything about this formula. $\endgroup$ – Ian Sep 6 '18 at 15:14
  • $\begingroup$ Okay. Thank you! You can write it as an answer so that I can accept it. $\endgroup$ – Nagabhushan S N Sep 6 '18 at 15:41
2
$\begingroup$

The formula you want is called the "law of the unconscious statistician":

$$E[g(X)]=\int_{-\infty}^\infty g(x) f_X(x) dx.$$

This holds for any measurable function $g$ and continuous random variable $X$. The fact that $g$ takes on discrete values doesn't change anything.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.