What is Cumulative Distribution Function of this random variable? Suppose that we have $n$ independent random variables, $x_1,\ldots,x_n$ such that each $x_i$ takes value $a_i$ with success probability $p_i$ and value $0$ with failure probability $1-p_i$ ,i.e.,
\begin{align}
P(x_1=a_1) & = p_1,\  P(x_1=0)= 1-p_1 \\
P(x_2=a_2) & = p_2,\ P(x_2=0) = 1-p_2 \\                                                                                                                                                                                                                                   
& \vdots \\
P(x_n=a_n) & = p_n,\ P(x_n=0)=1-p_n  
\end{align}
where $a_i$'s are positive Real numbers.
What would be the CDF of the sum of these random variables? That  is, what would be  $P(x_1+\cdots+x_n\le k)$ ? and how can we find it in an efficient way?

My solution to this problem is as follows
$P(x_1+⋯+x_n≤k)=∑ ^ n _{m=0}∑  _{A\epsilon T_m } \Pi_{i \epsilon A} p_i  \Pi_{i \epsilon A^c  } (1-p_i) $
where
$T_m=${{$r_1$,...,$r_m$}| $ a_{r_1}+...+a_{r_m}<=k$ }
and $A^c$ is the complement of $A$.
