Let $Z\sim\mathcal{N}(0,1)$. Let $X$ be a random variable defined as $X:=ZI_{Z>0}$, where $I_{Z>0}$ is an indicator random variable for the event $\{Z>0\}$. How do I find $\mathbb{E}[X]$?
Here's my attempt.
Let $\Omega$ be the sample space on which $Z$ is defined. The random variable $X$ is a product of two random variables, $Z$ and $I_{Z>0}$. We thus have $$X(\omega)=Z(\omega)\cdot I_{Z>0}(\omega)=\begin{cases}Z(\omega)\quad\text{if }Z(\omega)>0\\ \\ 0\quad\text{ if }Z(\omega)\le 0\end{cases}$$ Thus, the range of $X$ is $\{0\}\cup\mathbb{R^+}=[0,\infty)$.
We have $$\mathbb{P}(X=0)=\mathbb{P}(Z\le 0)=1/2$$ and $$\mathbb{P}(X\le x)=\begin{cases}0\quad\text{if }x<0\\\frac{1}{2}\quad\text{if }x=0\\\frac{1}{2}+\mathbb{P}(0\le Z\le x)\quad\text{if }x>0\end{cases}$$
But $\mathbb{P}(0\le Z\le x)=\Phi(x)-\Phi(0)=\Phi(x)-\frac{1}{2}$, where $\Phi$ is the CDF of $Z$.
We therefore have $$\mathbb{P}(X\le x)=\begin{cases}0\quad\text{if }x<0\\\frac{1}{2}\quad\text{if }x=0\\\Phi(x)\quad\text{if }x>0\end{cases}$$.
I have studied that $\mathbb{E}[Y]=\sum_{y}y\mathbb{P}(Y=y)$ if $Y$ is discrete, and $\mathbb{E}[Y]=\int_{-\infty}^\infty f_Y(y)\mathrm{d}y$ if $Y$ is a continuous r.v. But I am not able to figure out what type of random variable $X$ is. In my understanding, $X$ cannot be continuous since $\mathbb{P}(X=0)=1/2\neq 0$, and $X$ cannot be discrete either since the range of $X$ is uncountable. How do I calculate $\mathbb{E}[X]$?