4 ms·
Understanding Convolutions in Probability
- brrrrrm 4y agoA somewhat related, visual guide to discrete 2d convolutions: https://ezyang.github.io/convolution-visualizer/ https://ezyang.github.io/convolution-visualizer/
- thecleaner 4y agoSmall correction: this is correlation operator. Deep learning wise they (correlation and convolution) are equivalent but in probability it will lead to incorrect results.
- wnoise 4y agoTo elaborate, though the page does mention the distinction: (Cross-)correlation is convolution with a reversed kernel (second signal) (or vice-versa, of course). (For discrete signals, reversing the kernel is just a swapping the indexes around; which makes absolutely no difference for deep-learning). Convolution is more "natural" because it's abelian, whereas swapping signal and kernel in cross-correlation time-reverses the result.
- hackandthink 4y ago"At a high level, in probability, a convolution is the way to determine the distribution of the sum of two random variables." Probability of a certain sum value s is: sum of probabilities of all (a,b) with a + b = s (a: value from first input distribution. b: value from second input distribution) with probability (a,b) = probability(a) * probability(b)
- roumenguha 4y agoI loved this article, it helped me understand: https://betterexplained.com/articles/intuitive-convolution/ https://betterexplained.com/articles/intuitive-convolution/
- roumenguha 4y agohttps://betterexplained.com/articles/intuitive-convolution/ https://betterexplained.com/articles/intuitive-convolution/
- YouWhy 4y agoA minor thought I found inspiring many years ago: the Central Limit Theorem may be considered a statement about dynamic processes in the functional space of distributions. If you consider the operator of convolution (rescaling for unit variance), the normal distribution is the only attractor (under many "natural" choices of metrics).
- Sniffnoy 4y agoIt's actually not the only attractor -- it's just the only attractor once you restrict to finite variance. If you allow infinite variance, there can be others: https://en.wikipedia.org/wiki/Stable_distribution https://en.wikipedia.org/wiki/Stable_distribution
- amitport 4y agoCan you elaborate / add reference?
- fjkdlsjflkds 4y ago"Central Limit Theorem" says that "adding (bounded variance) stuff together makes it converge to a Gaussian" (roughly). On the other hand, when you are adding random variable together, you are actually convolving their densities. Thus, what the CLT says is that a gaussian is some sort of attractor/fixed point of the "dynamic process" of convolving (finite energy/bounded variance) distributions.
- amitport 4y agoThanks! Besides bounded variance they should also generally be independent. Or at least I'm not aware of a dependent variable version.
- fjkdlsjflkds 4y agoThere are (several) central limit theorems for dependent variables, but you often have to assume other things as well (e.g., stationarity, bounded third moment, and/or limited-range correlations) for it to work. Example: https://link.springer.com/chapter/10.1007/978-1-4612-0865-5_9 https://link.springer.com/chapter/10.1007/978-1-4612-0865-5_...
- rustybolt 4y agoMandatory link to a 3blue1brown video: https://m.youtube.com/watch?v=KuXjwB4LzSA https://m.youtube.com/watch?v=KuXjwB4LzSA For me, the way to understanding convolutions was to to put sample rand(0, 1) a bunch of times and bucket the samples, then plot the number of samples in a bucket. You get a more-or-less flat graph. Now if you add or multiply two variables, you get different shapes. Once you spent enough effort on trying to understand why, you derive convolutions.
- froh 4y agoyes, this is the video linked in the first paragraph of the Original article.
- hackernewds 4y agoYou seem to have replied without reading the article. This is linked right away in it.
- squaredot 4y agoAs the author mentions, convolutions for signal processing and convolutions for probability are essentially equivalent things in two different contexts. It is interesting that the same concept is behind the multiplication of polynomials. In the discrete case we have the parallel of the vectors representing ... the (discretized) probability density <-> the (discrete) signal intensity <-> the coefficients of the polynomial ... in the respective context. If we look at the discrete case, since the operation of convolution is computationally expensive (O(n^3)), people often rely on the Fast Fourier Transform Algorithm (FFT), that runs in O(n log(n)). An excellent and very enjoyable video on the FFT applied to the polynomial multiplication is https://youtu.be/h7apO7q16V0?t=1 https://youtu.be/h7apO7q16V0?t=1.
- sfpotter 4y agoDiscrete convolution is O(n^2).
- squaredot 4y agoYes, you're right.
- H8crilA 4y agoThat's the whole magic of FFT, it can be done in O(n*log(n)). And this is a practical algorithm, unlike the many fascinating algorithms for multiplying matrices. GMP will switch to FFT for multiplying very large numbers, for example, as numbers laid out in digits (whether binary or decimal) are polynomials if you look at them from the right angle. For processing audio and video it very quickly becomes economical to do the convolution in the frequency domain. EDIT: never mind, I just figured out that you pointed a typo in the parent comment. Straightforward implementation is indeed O(n^2)
- ABeeSea 4y agoNice jazz pun.
- mathematicaster 4y agoCame to say the same!
- Koshkin 4y ago> a convolution is the way to determine the distribution of the sum of two random variables Crucially, independent (i.e., uncorrelated) random variables. (At the other extreme, the sum of maximally correlated random variables is computed as a "comonotonic sum" instead).