Solved – Expectation with indicator function

expected valueindicator function

I have the following expectation

$$E[x_{t+1} \mathbf{1}_{\{x_{t+1}> z_t\}}]$$

where $x_{t+1}$ is a normally distributed random variable $x_{t+1}\sim N(0,\sigma^2)$, and $\mathbf{1}$ stands for the indicator function.
$z_t$ is a function of variables, as in $z_t = f(y_t,p_t)$, which I eventually need to solve for.

I need an analytical representation of this expectation.

Please let me know if this is unclear or need to add additional info. I am clearly new here.

Best Answer

The original random variable $X_{t+1}$ is normally distributed. Call its distribution $P_{X_{t+1}}$

Define a function

$$g(v) = v \cdot 1_{\{v > z_t\}}$$

where $1_{\{\cdot\}}$ is the indicator function. This can also be written as:

$$g(v) = \left \{ \begin{array}{cl} v & v > z_t \\ 0 & \text{Otherwise} \end{array} \right .$$

Another way to phrase your question is: what is the expected value of $g(X_{t+1})$? We can write this as:

$$E[g(X_t)] = \int_{-\infty}^{\infty} g(v) P_{X_{t+1}}(v) dv$$

We know that $g(v) = 0$ for $v \le z_t$, and $g(v) = v$ for $v > z_t$. So, we can split the integral across two intervals:

$$E[g(X_t)] = \int_{-\infty}^{z_t} 0 \cdot P_{X_{t+1}}(v) dv + \int_{z_t}^{\infty} v \cdot P_{X_{t+1}}(v) dv$$

The first term is clearly zero, so we're left with:

$$E[g(X_t)] = \int_{z_t}^{\infty} v \cdot P_{X_{t+1}}(v) dv$$

$X_{t+1}$ is normally distributed, so we can substitute $N(\mu, \sigma^2)$ in for $P_{X_{t+1}}$

$$E[g(X_t)] = \int_{z_t}^{\infty} \frac{v}{\sigma \sqrt{2 \pi}} \exp \left [ {-\frac{(v-\mu)^2}{2 \sigma^2}} \right ] dv$$

Evaluating the integral gives the final answer:

$$ E[g(X_t)] = \frac{\mu}{2} \left [ 1 - \text{erf} \left ( \frac{z_t - \mu}{\sigma \sqrt{2}} \right ) \right ] + { \frac{\sigma}{\sqrt{2 \pi}} \exp \left [ -\frac{(z_t - \mu)^2}{2 \sigma^2} \right ] } $$

where $\text{erf}(\cdot)$ is the error function

You can check that this is correct by simulation. Draw many samples from $N(\mu, \sigma^2)$, set values less than $z_t$ to zero, then take the sample mean.

Edit (as suggested by user12):

In the case where $X_{t+1}$ has mean zero, plug $\mu = 0$ into the last equation above, to obtain:

$$ E[g(X_t)] = \frac{\sigma}{\sqrt{2 \pi}} \exp \left [ -\frac{z_t^2}{2 \sigma^2} \right ] $$

Related Question