A convolution is the sum of two random variables. When those two random variables are [[independent and identically distributed|iid]], see the [[sums of random variables]] lookup for the resulting distribution. To calculate a convolution for any pair independent random variables with [[probability density function|pdf]] $f$ and $g$, the formula is $[f * g](s) = \int_{-\infty}^{\infty} f(x) \ g(s-x) \partial x$ where $s$ gives the new [[support]] of the summed random variable. For the discrete case $P_{X+Y}(s) = [ P_X + P_Y ](s) = \sum P_X(x) \cdot P_Y(s - x)$ In matrix form, a convolution would look like $ \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} * \begin{bmatrix} a & b \\ c & d \end{bmatrix} = d + 2c + 3b + 4a $ Convolution can be used as a **moving window** filter. Note the above convolution reduces the 2x2 input matrix to a 1x1 scalar output.