# what does z|G mean in nonparametric bayes?

when saying z is distributed according to G, where G comes from a dirichlet process, i saw this expression:

z|G ~ G

is this same meaning with z ~ G ?

## 1 Answer

It's not quite the same as $$Z\sim G$$.

• $$z|G\sim G$$ means that if you condition on the value of $$G$$, which is a distribution,$$z$$ comes from that distribution.
• $$z\sim G$$ means that $$z$$ comes from the distribution $$G$$.

To see the difference, consider a much simpler case: $$X\sim N(0,\sigma^2)$$ vs $$X|\sigma^2\sim N(0,\sigma^2)$$

• $$X\sim N(0,\sigma^2)$$ says $$X$$ has a Normal distribution (with mean $$0$$ and variance $$\sigma^2$$)
• $$X|\sigma^2\sim N(0,\sigma^2)$$ says $$X$$ has a Normal distribution conditional on $$\sigma^2$$ (with mean $$0$$ and variance $$\sigma^2$$), so $$X$$ has a Normal scale-mixture distribution unconditionally. If, for example, $$\sigma^2$$ had a $$\chi^2_1$$ distribution, $$X$$ would have a $$t_1$$ distribution unconditionally
• thx for the explanation! now i totally understand the difference – Rua May 2 at 6:52