On the notations
Consider the following function defined as:
The set is the domain of the function and is the argument of it. The set is the parameter space and the parameters ‘s of the function belongs to that set. For example has two parameters. The following notation is sometimes used to differentiate between the argument and parameter variables of a function:
it reads “f of x given .
In the probability theory, the concept of conditional probability also uses the same notation, i.e. that reads the probability of the event A given that the event B has occurred; or, the probability of -the event- A conditional on -the event- B. In the case of random variables/vectors, we write .
The definition of the probability density/mass functions also uses the aforementioned notation. Consider a random variable/vector with a probability density function (pdf) having some parameters. Then the pdf is written as:
This should be understood from the context that is not a random variable/vector and hence the above does not imply a conditional pfd. As pertains to a probability distribution (model), another letter is sometimes added to the above notation in order to include the model’s type or some information on the model :
A conditional pdf is identified with the same notation. Considering two random variables/vectors and , we write:
which is a function of if is already fixed. This reads the pdf of given -the observed and fixed value of- . Note that the notation is just a function notation.
A conditional pdf (as a result of normalizing a joint pdf which has parameters) has parameters; if the parameters of the conditional pdf are collected in a vector and denoted by the vector , the conditional pdf can be represented as:
such that it is a function of for a fixed value of the random variable and fixed values of the parameters . So, the notation “|” is used to indicate both the parameters of a function and conditions on/of random variables involved in a pdf. Whatever precedes “|” is (are) the function argument(s). Henceforward, I use the notation “|” for both of the purposes and the context will imply the meaning.
For a continuous random vector , a continuous joint pdf can be defined as:
where is a set of parameters involved in the definition of the pdf.
The form can also be interpreted as a function of at a constant :
This function is called the likelihood function. The notation reads the likelihood of given the (observed) data . Because is not a random variable/vector, the concept of conditional pdf is irrelevant. This is a function of the parameter , not , hence, it is not a density function. Depending on the variable in consideration, the function can be interpreted as either the density function or the likelihood function. It should be noted that the parameter(s) belongs to a model; this is usually implied implicitly. For example the pdf of a normally distributed random variable has two parameters and .
Usually, the parameters of a probability distribution are unknown. Therefore, there is uncertainty about the parameters. The parameters can then be collected in a random vector . Now both the data and the parameters are random vectors (or variables). A joint pdf can be imagined for the data and the parameters of the pdf of the data:
The notation reads “given a/the model M“. This notation is used merely to convey the fact that pertains to a model and also to express extra information about the model; indeed, it does not indicate a (quantitative) conditional on M.
Consequently, the following conditional pdf of given the data can be written as:
For a given , i.e. data, the above is a function of . Repeating the conditional pdf law, we can write:
M indicates that a model (joint distribution of data and parameters) is already assumed; it can be an implicit assumption. Also, any other background information about the model (e.g. the range of the parameters) is integrated into M. The terms are named and explained as:
1) The likelihood: is called sampling distribution. This is the distribution (of the observed) data conditional on the parameters. In other words, it tells us the pdf value of the data (measured) given some values of the parameters. This term is the pdf of data, , conditioned on , however, once the data have been observed/measured/given and hence becomes a fixed variable, the term becomes a function of the parameters (). Therefore, this term is referred to as the likelihood of the data. There is a subtle point here. The term is naturally a pdf in and hence can be imagined as:
Therefore, becomes a likelihood function if considered as a function of , i.e. (once the data have been observed/measured, it automatically becomes a function of the parameters). This likelihood function is the key function describing both the phenomenon (expressed by the model) and the measurements. Sometimes it is referred to as the likelihood of the parameters; but it is not really a suitable name because the likelihood uses the same function form identical to the conditional pdf in data. Moreover, the unit of a is where is the unit of data. This is because the unit of is and the unit of is .
2) The prior: is called the prior distribution of . This expresses the distribution of before observing the data (regardless of data). It encapsulates the information we have or assumed about the possible values of the model parameters regardless of the data.
3) The evidence: is the distribution (marginal pdf) of data. In mathematical notation: . The evidence is not a function of the parameters, therefore, it is just a normalization constant for the posterior.
4) The posterior: is called the posterior distribution (pdf) of . This is the pdf of the parameters (function of the parameters) given the model information and (observed) data.
Noting and keeping in mind that each of the different pdf’s in Eq. 2 is a function of the variable preceding “|” and pertaining to the pdf of the function’s argument, we usually write the equation as ( is replaced with ):
By the aforementioned notation, the term(s) after “|” conveys that the pdf is a conditional pdf if the term(s) pertains (be a value of) a random vector/variable. E.g: .
For given/measured data (fixed), the numerator of Eq. 3 is a function of the parameters while the denominator is a constant. Therefore, the following representations are defined and usually used in inference:
Application: Data modeling with parametric models
A generative model (also called the forward model) is the theoretical agent (usually a mathematical equation) that simulates/generates/predicts the observable data; the model is identified by its form (equation) and its parameters. A general form of a non-stochastic or deterministic generative model can be written as:
where is the simulated data/measurements, is the index at which the data is measured (e.g time, point at space, etc), and contains the parameters of the function (model). A stochastic model possesses some randomness; unlike a deterministic model that produces the same output for the same parameters (and initial conditions), a stochastic model produces different outputs. Stochastic models predict distribution(s) over the outputs.
A generative model predicts the data in the absence of measurements noise i.e. for measurements . It means that the models gives the true value while the measurements are polluted with noise introducing uncertainty into the measurements. We should distinguish between the true/ideal data and the noisy data/measurements. Noisy data (out of measurements) is what we usually have. The model form and its parameters are always determined based on the observed noisy data/measurements. Therefore, we should know how the measurement process influences the true data/values. To this end, a measurement model also called a noise model is also to be defined. This model contains the uncertainty/noise in the measured data. The measurement model can then be written as . The variable is actually a random variable/vector introducing the noise.Consequently, the measurement, becomes a random variable/vector as well. Having said that and using capital or bold letters for random vectors/variable and small or non-bold letters for non-random variables, we write:
where is a probability sample space. Note that is a function of not a pdf. is inherently a stochastic process/random field, i.e. at each (index), a random variable exits. The noise, has a distribution and indeed a pdf, , with its own parameters . In such a model, the noise average is set to be zero, i.e. , therefore, the mean of a measurement at each point is equal to the ideal data. This is simply because the simulating part is not a random vector, hence, .
Because is not a random variable/vector, the probability distribution of and of the noise (model) are the same with different means. In such a data modeling, the noise distribution is assumed (known) and the simulating function parameters are sought. This approach is not Bayesian.
A Bayesian approach to data modeling arises when the parameters of the generative model (simulating function) are also considered to be random variables, ; this means there is uncertainty introduced into the parameters. hence, a probability model is designated to the parameters. The data model can now be written as:
where indexes . Now the measurement model is the result of sum of the two random variables/vectors, i.e. a function of a random vector/variable, and the noise. The random variable/vector has a pdf with its own parameters:
where is a vector of parameters. The assumption on the probability distribution of the parameters of a generative model enforces a prior on the model’s parameters. This prior does not depend on the data or the noise.
The probability distribution of noise is usually/initially assumed. What remains unknown are the probability distributions of and . In this regard, the joint probability distribution and hence the joint pdf of these two unknown random variables/vectors can be considered at each index :
Using the Eq. 3 (Bayes’ theorem), we write:
where the assumed/preset parameters (in Eq. 8) are integrated into the model information.
The term , namely the likelihood of data when observed, can be written in terms of the noise pdf if the noise random vector/variable is assumed to be independent of the parameters. It is usually the case. Denoting the cumulative distribution function by , and considering the eq. 6 at one fixed indexing point , we can write:
It is worthy of note that if the parameter vector is not a random vector (as used in the model in Eq. 5), but just a deterministic parameter, denoted by , then at a particular point indexed by , we have . This different from the random vector , therefore we denote it by . For a deterministic , we have , because:
As becomes the parameter of the function , we can write . Comparing with the case of probabilistic parameter, we can say that for a given value of , the random vector becomes , i.e with the the pdf as in Eq. 11. In other words,
Note that for any two random vectors and , the term (or vice versa) is another random vector like with the support .
In any of the approaches on the parameters, or [/latex]Y^*[/latex] are to model the data. Therefore, sample of observed values of data are substituted for their values in order to find the model parameters.
It is common to assume a (multivariate) Gaussian distribution for the noise, . The noise distribution now has a single parameter . This implies that the covariance matrix of noise is diagonal. Also, it is assumed that the noises (the random vector) of all measurements (a vector of measurements indexed by ) are iid, meaning that they have the same variance, i.e. identically distributed, and probabilisticly independent of each other, i.e. independent. In this regard (for or ):
and with the iid assumption for the noise, its covariance matrix becomes an diagonal and isotropic having as its diagonal elements:
One of the simplest models is a straight line; it simulates 1D data, like temperatures measured at different moments. The model is
To be reviewed and continued…