Let \(Z = X_1 + X_2 + \cdots + X_k\) where the \(X_i\) are
independent random variables.
Mean:
$$E(Z) = \sum_{i=1}^{k} E(X_i)$$
Variance:
$$\mathrm{Var}(Z) = \sum_{i=1}^{k} \mathrm{Var}(X_i)$$
Probability density function (p.d.f):
$$f_Z(z) = (f_{X_1} * f_{X_2} * \cdots * f_{X_k})(z)$$
Support: \(\sum_i \inf S_{X_i}\) to \(\sum_i \sup S_{X_i}\), which
is discrete if (and only if) all of the \(X_i\) are discrete.
The k-way convolution is computed in a single FFT pass: each component is
discretised onto a common grid, transformed via FFT, all transforms are
multiplied element-wise, and a single inverse FFT yields the result. This
avoids compounding approximation errors from nested binary convolutions.
Components are discretised into probabilities rather than densities, which
preserves their mass regardless of how the scales of the distributions
being summed compare. When all of the distributions are supported on the
integers this is done exactly on the integer lattice, and the result is a
discrete distribution with an exact probability mass function. Otherwise
the distributions are discretised into the probabilities of the cells of a
common grid (which is aligned with the integers if any of the
distributions are discrete, so that their atoms are also exact).
The accuracy of the FFT approximation can be controlled by passing n
(number of grid cells, default 2^12) and tail_p (tail probability used
to find finite grid bounds for distributions with infinite support, default
1e-6) to density(), cdf(), quantile(), or generate(). A warning
is given if the grid is too coarse to resolve any of the distributions
being summed.