Artificial intelligent assistant

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. $$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 381f64ca8246a172ced836b45df5851f