Computing CDF of normal PDF

I am confused on how to compute the numerical value for the normal cdf from $$0$$ to $$\infty$$. Is the following calculation correct?

$$\int_{0}^{+\infty}\frac{1}{\sqrt{2\pi\sigma^2}}\exp{\left(-\frac{(x-\mu)^2}{2\sigma^2}\right)}dx = \Phi(\infty) - \left(1-\Phi\left(\dfrac{\mu}{\sigma}\right)\right)= 1 - \left(1-\Phi\left(\dfrac{\mu}{\sigma}\right)\right) = \Phi\left(\dfrac{\mu}{\sigma}\right)$$

• You get the integral immediately by making the substitution $y=\frac {x-\mu} {\sigma}$. Commented May 13, 2023 at 23:17
• okay I still don't see what is wrong with using $\Phi$ as I did. Commented May 14, 2023 at 0:42

You did nothing wrong. If you substitute with $$z=\frac{x-\mu}{\sigma}$$ it gets more obvious that you are right. The lower limit for z is $$\frac{0-\mu}{\sigma}=\frac{-\mu}{\sigma}$$ Differentiating gives $$\frac{dz}{dx}=\frac{1}{\sigma}\Rightarrow dx=\sigma \ dz$$. Thus the integral becomes
$$\int_{\frac{-\mu}{\sigma}}^{\infty} \frac{1}{\sqrt{2\pi}\require{cancel} \cancel{\sigma}}\cdot \exp{\left(-\frac{z^2}{2 }\right)}\cdot \require{cancel} \cancel{\sigma} \ \ dz=\int_{\frac{-\mu}{\sigma}}^{\infty} \frac{1}{\sqrt{2\pi}}\cdot \exp{\left(-\frac{z^2}{2 }\right)} \ \ dz$$
For a standard normal distributed random variable we have the relation $$\Phi(-z)=1-\Phi(z)$$. In your case it is $$-z=\frac{-\mu}{\sigma}$$. This area you subtract from the whole area which is 1:
$$P\left(Z>\frac{-\mu}{\sigma}\right)=1-P\left(Z<-\frac{\mu}{\sigma}\right)= 1-\left(1-\Phi\left( \frac{\mu}{\sigma}\right)\right)=\Phi\left( \frac{\mu}{\sigma}\right)$$