Common sampling notation

— “ is distributed as ”.
— iid samples.
— Monte Carlo sample (common in ML/VI).
Algorithmic pseudocode: or .
Conditional/controlled: (RL).
Evo/ES style: , population .

“Reparametrization trick”

Given a mean (vector) and a standard deviation (vector) , and a (vector of) noise from a spherical standard gaussian , we can sample from the gaussian with mean and standard deviation by scaling and shifting the noise:

where denotes the element-wise product.

Sampling elements from choices

When order matters:

With replacement:
Without replacement: (pool gets smaller with each sample)

When order doesn’t matter:
(binomial coefficient = “selection from a partial multiset”)

Link to original