The sum of two independent random variables can be calculated via either convolution [^1] or by using moment generating functions.
Sum of Random Variables as Convolution
Discrete
The sum of two independent discrete random variables has the probability of
If we write it as PMFs, we can see that the PMF of the sum is the discrete convolution of individual PMFs
Continuous
Similarly, for continuous random variables, the PDF of the sum is the continuous convolution of the two inputs
Note that both the cases above require the random variables to be independent, in other word
Related to Central Limit Theorem
Another interesting consequence is the central limit theorem. Since since convolution tends to smooth functions, repeatedly applying convolutions eventually give us the bell-curve shape.
Examples
The Sum of Independent Poissons is Poisson
and more generally:
X_{1}, X_{2}, \ldots, X_{n} \stackrel{i i d}{\sim} \exp (\text { rate }=\lambda) \Rightarrow \sum_{i=1}^{n} X_{i} \sim \Gamma(n, \lambda)
X_{1}, X_{2}, \ldots, X_{n} \stackrel{i i d}{\sim} \Gamma(\alpha, \beta) \Rightarrow \sum_{i=1}^{n} X_{i} \sim \Gamma(n \alpha, \beta) .