Why am I computing the PDF of this modification of a normal distribution wrongly?

14 Views Asked by At

Let $Z$ be a standard normal variable (mean $0$ and variance $1$), $\theta\in \mathbb{R}$ and $X=\theta+|Z|$. I want to find the density of $X$.
I began by computing the cummulative function. So, for $x\in \mathbb{R}$, we have $$\mathbb{P}(X\le x)=\mathbb{P}(|Z|\le x-\theta)=\mathbb{P}(Z\le x-\theta)-\mathbb{P}(Z\le \theta-x)=2\mathbb{P}(Z\le x-\theta)-1.$$ After differentiation, I get that the density of $X$ should be $$\sqrt{\frac{2}{\pi}}e^{-\frac{(x-\theta)^2}{2}}$$ for real $x$, but this is obviously not a density function (it doesn't integrate to $1$). So, where did I go wrong?

1

There are 1 best solutions below

2
On BEST ANSWER

The statement $$P(|Z|\le a)=P(Z\le a) - P(Z\le -a)$$ is valid only if $a\ge 0$. When $a<0$, the RHS is zero. Translating this back to your context, your calculation of the cumulative function is valid when $x-\theta\ge 0$. When $x-\theta <0$, the cumulative equals zero. You will end up with a density for $\theta +|Z|$ defined by two cases.