# Sum of random number of random variables

Suppose there are n i.i.d exponential random variables,say $X_{i},i=1,2,\cdots ,n$ with probability density function $$f(x)=\left\{\begin{matrix} e^{-x} &x\geqslant 0 \\ 0& x<0 \end{matrix}\right.$$ Now let $S=\left \{ X_{i}|X_{i}<\tau ,i=1,2,\cdots ,n\right \}$ be a set of $X_{i}$s satisfying $X_{i}<\tau$.

So what is the pdf or cdf of $$Y=\sum_{X_{i}\in S}X_{i}$$

Let $u:x\mapsto x\mathbf 1_{x\lt\tau}$, then $Y=\sum\limits_{i=1}^nu(X_i)$ is the sum of $n$ i.i.d. random variables. Just like in your other question, there is no reason to expect a simple expression for its PDF, in fact the distribution of $Y$ has an atom of mass $\mathrm e^{-n\tau}$ at $0$ hence, stricto sensu $Y$ has no PDF. However, there exists a PDF $f_{n,\tau}$ such that, for every Borel subset $B$ of $\mathbb R_+$, $$\mathbb P(Y\in B)=\mathrm e^{-n\tau}\mathbf 1_{0\in B}+(1-\mathrm e^{-n\tau})\int_Bf_{n,\tau}(x)\mathrm dx.$$
• About what?  – Did Feb 5 '13 at 14:21
• I have calculated the PDF of random variable u and found there is a mass of probability $e^{-\tau }$ at 0.I think this may be the reason why there exists no PDF of Y.Thanks a lot. – yyzhang Feb 6 '13 at 3:40