Probability and statistics

p(y∣x)p(y \mid x) Given (conditional bar)

“Given”: p(y | x) is the probability of y given that x is known.

In ML papers

The vertical bar in p(y∣x)p(y \mid x) reads "given": the distribution of yy once xx is known. A classifier models p(y∣x)p(y \mid \mathbf{x}); a VAE's encoder is qϕ(z∣x)q_\phi(\mathbf{z} \mid \mathbf{x}) and its decoder pθ(x∣z)p_\theta(\mathbf{x} \mid \mathbf{z}). Everything to the right of the bar is treated as fixed.

Other meanings, by context

How to type it

LaTeXShows
p(y \mid x) spaced, preferredp(y∣x)p(y \mid x)
p(y | x)p(y∣x)p(y | x)

A worked example

p(rain∣clouds)=0.4,p(rain)=0.1p(\text{rain} \mid \text{clouds}) = 0.4, \qquad p(\text{rain}) = 0.1

Knowing it is cloudy changes the probability of rain.

Common confusions

Equations that use it

Related

p(x),  q(z)p(\mathbf{x}), \; q(\mathbf{z})Probability p(x)p(x;θ)p(x; \theta)Semicolon (parameterized by)∣x∣|x|Absolute value (bars)Ex∼p[f(x)]\mathbb{E}_{x \sim p}[f(x)]Expectation

Decode this example →