So I'm reading notes on Gaussian Processses, and came across syntax $p(\mathbf{y} \mid \text{stuff}) = N(\mathbf{y} \mid \mathbf{0}, \mathbf{K})$ for multivariate normal distribution, and I'm not exactly sure how to decipher it the $\mathbf{y} | $ bit. I suppose it doesn't mean "mean $\mathbf{y}$ is conditional on zero vector", because I don't think that makes sense. Assuming this is standard notation for something and I'm just unfamiliar with it, what it means? E.g. how it differs from $N(\mathbf{0}, \mathbf{K})$?


1 Answer 1


This means that $\mathbf{y}$ (a $d$-dimensional random variable) conditional on stuff has the distribution $\mathrm{N}(\mathbf{0},\mathbf{K})$, i.e., normal with mean $\mathbf{0}\in\mathbf{R}^d$ and covariance $\mathbf{K}$ (a $d\times d$ matrix). The notation points a difference between a (conditional) probability distribution of a random variable ($\mathrm{N}(\mathbf{0},\mathbf{K})$) and the corresponding (conditional) probability density function $\mathrm{N}(\mathbf{y} \mid \mathbf{0},\mathbf{K})$.

So, we write \begin{equation} \mathbf{y} \mid \textrm{stuff} \sim \mathrm{N}(\mathbf{0},\mathbf{K}) \end{equation} to say that $\mathbf{y}$ conditional on stuff is normally distributed with mean $\mathbf{0}$ and covariance $\mathbf{K}$. This in turn implies that the probability density function of the conditional distribution of $\mathbf{y}$ given stuff is
\begin{equation} p(\mathbf{y} \mid \textrm{stuff}) = \mathrm{N}(\mathbf{y} \mid \mathbf{0},\mathbf{K})= (2\pi)^{-d/2}\,|\mathbf{K}|^{-1/2}\,e^{-\frac{1}{2}\,\mathbf{y}^T\mathbf{K}^{-1}\mathbf{y}}. \end{equation}

The latter one is just a function, which can for example be multiplied with another probability density function in expressions such as 'posterior is proportional to the product of prior and likelihood'.

This notation is used, e.g., in the Bayesian Data Analysis textbook by Andrew Gelman et al., see p. 6 in the third edition for remarks on notation.

  • 1
    $\begingroup$ Maybe add that k is the dimension of y (and thus K is a k*k matrix)? $\endgroup$
    – JHBonarius
    Jul 30, 2019 at 12:26
  • 1
    $\begingroup$ @JHBonarius Thanks, added remarks about the dimensions (also changed $k$ to $d$) $\endgroup$ Aug 10, 2019 at 6:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.