2
$\begingroup$

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)$?

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

2 Answers 2

1
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ 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)$? $\endgroup$
    – Theodore
    Commented Dec 1, 2020 at 9:20
  • $\begingroup$ @Theodore It depends on how the models are set up. $\Sigma$ may or may not be a parameter of the model. $\endgroup$ Commented Dec 1, 2020 at 9:21
1
$\begingroup$

Despite what some comments have claimed, such expressions are common in Bayesian probability and statistics and do have meaning in terms of conditional densities with respect to parameters and hyperparameters.

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$.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .