# About Normal Distribution Probability Density Function Notation

The equation for probability density function is:

$$f(x|\mu, \sigma^{2})=(1/(2\pi \sigma^2 ))^{1/2}exp[-(x-\mu)^{2}/2\sigma^{2}]$$

What does the notation $$f(x|\mu, \sigma^{2})$$ mean? Does it have the same meaning as in conditional probability? And sometimes I'll see $$\mu|\sigma^2$$ being omitted becoming $$f(x)$$, or only $$\sigma^2$$ being omitted becoming $$f(x|\mu)$$. Does they mean the same?

And what about something like $$f(x|a,b,\sigma^2)$$ and $$f(x|a,b)$$?

• It just indicates the parameters of the distribution (the mean and the variance) . Nothing to do with conditional probabilities. Commented Dec 1, 2020 at 8:57
• Is it usual for $\sigma^2$ being omitted? Does the expression still the same? Commented Dec 1, 2020 at 9:01

Anything written after the pipe $$\mid$$ indicates parameters of the function that are usually held constant for each instance of the function – they can be inferred from context when omitted.
The same notation is found with elliptic integrals and functions: A&S uses $$F(\varphi\mid m),\operatorname{sn}(u\mid m)$$ and so on, where $$m$$ is called… the parameter.
• What about for notation like $f(a|b)$ where both $a$ and $b$ are matrices, does it equivalent to $f(a|b,\Sigma)$ or $f(a|\Sigma, b)$? Commented Dec 1, 2020 at 9:20
• @Theodore It depends on how the models are set up. $\Sigma$ may or may not be a parameter of the model. Commented Dec 1, 2020 at 9:21
For instance, we could define a hierarchical model in which $$X \mid \mu, \sigma \sim \operatorname{Normal}(\mu, \sigma^2),$$ and $$\mu$$ is itself a random variable: $$\mu \sim \operatorname{Normal}(\mu_0, \sigma_0^2).$$ In this model, $$\sigma$$ is fixed and known; $$\mu_0$$ and $$\sigma_0$$ are hyperparameters representing the prior distribution of $$\mu$$. Then based on an observed sample $$\boldsymbol X = (X_1, X_2, \ldots, X_n)$$, we can compute a posterior density for $$\mu$$ given the data $$\boldsymbol X$$. We write this as $$f(\mu \mid \boldsymbol X, \sigma, \mu_0, \sigma_0) = \frac{f(\boldsymbol X \mid \mu, \sigma)f(\mu \mid \mu_0, \sigma_0)}{f(\boldsymbol X)},$$ which is essentially Bayes' theorem. Here, $$f(\mu)$$ is the prior density, and the denominator is the marginal density of the joint distribution of the sample $$\boldsymbol X$$.
The takeaway is that the symbols that are written after the $$|$$ sign are intended to represent those quantities that are fixed with respect to those symbols written before the $$|$$ sign. Note that if we wanted to, we could write $$f(\boldsymbol X \mid \mu, \sigma) = f(X_1, X_2, \ldots, X_n \mid \mu, \sigma),$$ showing explicitly that the joint density is a mapping $$f : \mathbb R^n \to \mathbb R$$.