# Why are density functions sometimes written with conditional notation?

I keep seeing density functions that don’t explicitly arise from conditioning written with the conditional sign:
For example for the density of the Gaussian $$N(μ,σ)N(\mu,\sigma)$$ why write:
$$f(x|μ,σ)=1√2πσ2exp−(x−μ)22σ2 f(x| \mu, \sigma)=\frac{1}{\sqrt{2\pi \sigma^2}}\exp{-\frac{(x-\mu)^2}{2\sigma^2}}$$

$$f(x)=1√2πσ2exp−(x−μ)22σ2 f(x)=\frac{1}{\sqrt{2\pi \sigma^2}}\exp{-\frac{(x-\mu)^2}{2\sigma^2}}$$

Is this done purely to be explicit as to what the parameter values are or(what I’m hoping for) is there some meaning related to conditional probability?

• In a Bayesian context, the parameters are random variables, so in that context the density is actually the conditional density of $$X∣(μ,σ)X \mid (\mu, \sigma)$$. In that setting, the notation is very natural.
• Outside of a Bayesian context, it is just a way to make it clear that the density depends (here I am using this word colloquially, not probabilistically) on the parameters. Some people use $$fμ,σ(x)f_{\mu, \sigma}(x)$$ or $$f(x;μ,σ)f(x; \mu, \sigma)$$ to the same effect.
• This latter point can be important in the context of likelihood functions. A likelihood function is a function of the parameters $$θ\theta$$, given some data $$xx$$. The likelihood is sometimes written as $$L(θ∣x)L(\theta \mid x)$$ or $$L(θ;x)L(\theta ; x)$$, or sometimes as $$L(θ)L(\theta)$$ when the data $$xx$$ is understood to be given. What is confusing is that in the case of a continuous distribution, the likelihood function is defined as the value of the density corresponding to the parameter $$θ\theta$$, evaluated at the data $$xx$$, i.e. $$L(θ;x):=fθ(x)L(\theta; x) := f_\theta(x)$$. Writing $$L(θ;x)=f(x)L(\theta; x) = f(x)$$ would be confusing, since the left-hand side is a function of $$θ\theta$$, while the right-hand side ostensibly does not appear to depend on $$θ\theta$$. While I prefer writing $$L(θ;x):=fθ(x)L(\theta; x) := f_\theta(x)$$, some might write $$L(θ;x):=f(x∣θ)L(\theta; x) := f(x \mid \theta)$$.