Probability and statistics

x∼pdatax \sim p_{\text{data}} Distributed as (tilde)

“Is drawn from” or “is distributed as”: x ~ p means x is a sample from the distribution p.

In ML papers

x∼px \sim p reads "xx is distributed as pp" or "xx is sampled from pp". So z∼N(0,I)\mathbf{z} \sim \mathcal{N}(\mathbf{0}, \mathbf{I}) says z\mathbf{z} is a standard normal random vector, and x∼Dx \sim \mathcal{D} that xx is drawn from the dataset. Inside an expectation's subscript, Ex∼p\mathbb{E}_{x \sim p}, it names the variable being averaged over and its distribution.

Other meanings, by context

How to type it

LaTeXShows
\sim∼\sim
\overset{\text{iid}}{\sim} independent and identically distributed∼iid\overset{\text{iid}}{\sim}

A worked example

ϵ∼N(0,1):ϵ=0.31, −1.20, 0.05,…\epsilon \sim \mathcal{N}(0, 1): \quad \epsilon = 0.31,\ -1.20,\ 0.05, \ldots

Each draw is a different number; the distribution says how often each value turns up.

Common confusions

Equations that use it

Related

Ex∼p[f(x)]\mathbb{E}_{x \sim p}[f(x)]ExpectationN(μ,σ2)\mathcal{N}(\mu, \sigma^2)Normal distributionp(x),  q(z)p(\mathbf{x}), \; q(\mathbf{z})Probability p(x)x~\tilde{x}Tilde accent

Decode this example →