Expected Shifted Normal CDF as a Difference Probability
Summary
The document derives the expectation of a standard normal CDF evaluated at a shifted normal variable. It first notes that, without a shift, applying a continuous CDF to a random variable with that same distribution yields a uniform variable and therefore an expectation of one half. For a positive shift, it rewrites the expectation as a probability involving two independent, identically distributed normal variables: the probability that their difference is no greater than the shift. Their difference is normal with variance twice the original variance, giving the standard normal CDF evaluated at the shift divided by the standard deviation times the square root of two.
The discussion also presents a distribution-transform view and a rough simulation check. The central derivation assumes the CDF and random variable share the same normal distribution and relies on independence in the equivalent two-variable construction. The simulation is illustrative rather than a proof, and one response contains an imprecise statement about the difference’s standard deviation; the accepted derivation provides the consistent result.
Key ideas
- Applying a continuous CDF to a variable drawn from that same distribution gives a uniform variable.
- The shifted expectation can be represented as the probability that one independent normal draw is at most another plus the shift.
- The difference of two independent normals with equal variance has variance twice that variance.
- The resulting expectation is the normal CDF of the shift standardized by the difference distribution’s standard deviation.
Tags
Full text
# Calculate the expectation of a shift CDF
# Calculate the expectation of a shift CDF
Suppose $X$ is a normal random variable with mean 0, and variance $\sigma^2$. $F(x)$ is the CDF(cumulative distribution function) of a standard normal random variable(mean 0 and variable 1), how to calculate the expectation of $ F(X+a)$, where $ a>0 $.
This was a quant interview question. I know how to calculate the expectation of F(X), i.e when $a=0$, but I have no idea when $a \neq 0$.
My solution for $a=0$:
Method 1: Since F(x) is the CDF of a normal random variable with mean 0, and variance $\sigma^2$. We will have F(x)=1-F(-x). Suppose that f(x) is the corresponding pdf, and f(x)=f(-x). Then \begin{align} \mathbb{E}[F(X)]&=\int_{-\inf}^{+\inf} F(s)f(s)ds\\ &=\int_{-\inf}^{+\inf} (1-F(-s))f(s)ds\\ &=1-\int_{-\inf}^{+\inf} F(-s)f(s)ds\\ &=1-\int_{-\inf}^{+\inf} F(m)f(m)dm \end{align} Hence we have $$ \int_{-\inf}^{+\inf} F(s)f(s)ds=\frac{1}{2}$$
Method 2(This method seems it didn't require that X is normal random variable): Let's first compute the distribution for $F(X)$: \begin{align} \mathbb{P}\{F(X) \leq y\}&=\mathbb{P}\{X \leq F^{-1}(y)\}\\ &=F\cdot F^{-1}(y)=y \end{align} So $F(X)$ is uniformly distributed, hence the mean is $\frac{1}{2}$.
## Answer by Andreas (score 8, accepted)
https://quant.stackexchange.com/a/7545
This leads to the same result as Alexeys answer. However, my reasoning is different. $$ E[F_X(X+a)]=\int_{-\infty}^{\infty} F_X(x+a) f_X(x)dx=\int_{-\infty}^{\infty} \int_{-\infty}^{x+a}f_X(y)dy f_X(x)dx=\\ \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} 1_{(-\infty,x+a]}(y) f_X(y) f_X(x)dydx= \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} 1_{_{\{y-x\le a\}}}(y) f_X(y) f_X(x)dydx. $$
The product of the two densities in the integral is the density of a bivariate Gaussian vector (X,Y), whose components are independent and follow a normal distribution $N(\mu,\sigma^2)$. Hence this integral is the same as
$$ E[1_{\{Y-X\le a\}}]=P[\{Y-X\le a\}], $$
where $Y,X$ are iid $N(\mu,\sigma^2)$. Thus $Y-X$ has a $N(0,2\sigma^2)$ distribution. We get
$$ E[F_X(X+a)]=F_{Y-X}(a)=\Phi\left(\frac{a}{\sqrt{2}\sigma}\right). $$
## Answer by Good Guy Mike (score 1)
https://quant.stackexchange.com/a/7508
Hopefully this is correct...
So firstly, what is $F(X)$ when $X$ is a random variabel?
This is where I might be completely wrong, but at least it gives the correct answer in the case of a=0, so let's try that one first.
We have two random variables with the same normal distribution, mean 0 and sd $\sigma^2$. $X_1, X_2$
So we are supposed to calculate $F_{X_1}(X_2) = P(X_1 \leq X_2) = P(X_1 - X_2 \leq 0)$
Since both $X_1$ and $X_2$ are both normal we have that $X =X_1 - X_2$ is also normal with mean $0$ and s.d. $2\sigma^2$
So we have $P(X \leq 0)$ which is 1/2.
For the case of $a \neq 0$ we would get $P(X \leq a)$ which is $F_{X}(a)$. However it seems like it would always end up as a constant, so the expected value seems a bit 'redundant', which makes me think that this might not be the correct solution..
edit: Also, in $P(X \leq a)$ you could divide to get, since mean is 0, divide to get standard normal and you would get $\Phi(\frac{a}{\sqrt2sigma})$ or smth like that.
edit2:
```
sigma = 2;
n = 5000000;
a=5;
mean(normcdf(normrnd(0,sigma,1,n)+a,0,sigma))
normcdf(a/(sqrt(2)*sigma),0,1)
```
## Answer by Alexey Kalmykov (score 1)
https://quant.stackexchange.com/a/7513
As you already mentioned you can get the CDF of this distribution using distribution transform:
$$P(F(X+a)\le y)=P(F^{-1}(F(X+a))\le F^{-1}(y))=P(X+a\le F^{-1}(y))=P(X\le F^{-1}(y)-a)=F(F^{-1}(y)-a)$$
Then you could write down expectation in integral form, but on the first glance it seems not so trivial how to get an explicit expression. Probably they didn't expect you to do this.
You can also try to run quick Monte-Carlo in R to see what your distribution looks like:
```
a <- 1
sigma <- 2
m <- pnorm(rnorm(10000,0,sigma)+a,0,sigma)
hist(m)
plot(ecdf(m))
mean(m)
```
You will definitely see that it's not uniform for the values of $a$ that are significantly bigger than 0.Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.