Truncated Normal Distribution Let $X$~$N(0,1)$.  Define the random variable $X_c$ as $X$ if $|X| \le c$ and $0$ otherwise.  I am trying to figure out the density function of $X_c$ to calculate $E(X_c)$ and $Var(X_c)$.  Outside of $-c$ and $c$ the density function should be 0.  Between $-c$ and $0$ and then between $0$ and $c$, the density function should be the same as $X$'s density function.  However, I can't figure out how to handle it at 0.  Do I need a dirac delta or something similar.  I don't have much experience with discontinuous density and distribution functions.  Finally, is the the variance stated in this wiki article correct here http://en.wikipedia.org/wiki/Truncated_normal_distribution ?  I tried calculating variance using conditioning and got their answer times $P(-c\le x\le c)^2$.  That is when I started looking back at the density function.
 A: Let $X$ denote a continuous random variable with density $f_X$ and $X_c=X\mathbf 1_{|X|\leqslant c}$ for some $c\geqslant0$. The distribution of $X_c$ has a Dirac part at $0$ with mass $p_c=P[|X|\gt c]$ and a densitable part with density $g_c$ defined by $g_c(x)=f_X(x)\mathbf 1_{|x|\leqslant c}$ for every $x$.
Note that $\displaystyle p_c+\int_\mathbb Rg_c=p_c+\int_{-c}^cf_X=P[|X|\gt c]+P[|X|\leqslant c]=1$, as it should.
Furthermore, for every measurable function $u$ such that $u(X_c)$ is integrable, $\displaystyle E[u(X_c)]=p_cu(0)+\int_{-c}^cu(x)f_X(x)\mathrm dx$. Thus, for every positive integer $n$,
$$
E[X_c^n]=\int_{-c}^cx^nf_X(x)\mathrm dx.
$$
When $X$ is symmetric (for example $X$ centered normal), $E[X_c]=0$ and
$$
\mathrm{var}(X_c)=\int_{-c}^cx^2f_X(x)\mathrm dx=E[X^2;|X|\leqslant c].
$$
A different object is the distribution of $X$ conditioned by $|X|\leqslant c$. A random variable $Y_c$ follows this distribution if and only if, for every $u$ such that the RHS exists,
$$
E[u(Y_c)]=E[u(X)\mid |X|\leqslant c].
$$
Then,
$$
E[u(Y_c)]=\frac{E[u(X); |X|\leqslant c]}{P[|X|\leqslant c]},
$$
hence, if $u(0)=0$,
$$
E[u(Y_c)]=\frac{E[u(X_c)]}{P[|X|\leqslant c]},
$$
for example,
$$
\mathrm{var}(Y_c)=\frac{\mathrm{var}(X_c)}{P[|X|\leqslant c]}.
$$
A: The variance in the Wikipedia article is correct; however, your analysis elides an important distinction.
If $X$ is normally distributed, then let $f(x)$ be its probability density function. Then $\int_{-\infty}^\infty f(x)\ dx = 1$, by definition of a probability density function.
It follows that since $f(x) > 0$ for all $x$, then $\int_{-c}^c f(x)\ dx < \int_{-\infty}^\infty f(x)\ dx$ for all finite $c$.
Therefore, the distribution function for $X_c$ you have described does not yield a probability distribution function.
As a consequence, you must transform $x \mapsto kx$ in the description of $X_c$'s distribution function by some $k$ such that $\int_{-c}^c f(kx)\ d(kx) = 1$. Computing your variance, etc. from here should address those errors.
