Projected normal distribution

From testwiki
Jump to navigation Jump to search

Template:Short description

Template:Infobox probability distribution

In directional statistics, the projected normal distribution (also known as offset normal distribution, angular normal distribution or angular Gaussian distribution)Template:SfnTemplate:Sfn is a probability distribution over directions that describes the radial projection of a random variable with n-variate normal distribution over the unit (n-1)-sphere.

Definition and properties

Given a random variable ๐‘ฟโˆˆโ„n that follows a multivariate normal distribution ๐’ฉn(๐,๐œฎ), the projected normal distribution ๐’ซ๐’ฉn(๐,๐œฎ) represents the distribution of the random variable ๐’€=๐‘ฟโ€–๐‘ฟโ€– obtained projecting ๐‘ฟ over the unit sphere. In the general case, the projected normal distribution can be asymmetric and multimodal. In case ๐ is parallel to an eigenvector of ๐œฎ, the distribution is symmetric.Template:Sfn The first version of such distribution was introduced in Pukkila and Rao (1988).Template:Sfn

Support

The support of this distribution is the unit (n-1)-sphere, which can be variously given in terms of a set of (nโˆ’1)-dimensional angular spherical coordinates:

๐œฃ=[0,ฯ€]nโˆ’2ร—[0,2ฯ€)โŠ‚โ„nโˆ’1

or in terms of n-dimensional Cartesian coordinates:

๐•Šnโˆ’1={๐’›โˆˆโ„n:โ€–๐’›โ€–=1}โŠ‚โ„n

The two are linked via the embedding function, e:๐œฃโ†’โ„n, with range e(๐œฃ)=๐•Šnโˆ’1. This function is defined by the formula for spherical coordinates at r=1.

Density function

The density of the projected normal distribution ๐’ซ๐’ฉn(๐,๐œฎ) can be constructed from the density of its generator n-variate normal distribution ๐’ฉn(๐,๐œฎ) by re-parametrising to n-dimensional spherical coordinates and then integrating over the radial coordinate.

In full spherical coordinates with radial component rโˆˆ[0,โˆž) and angles ๐œฝ=(ฮธ1,…,ฮธnโˆ’1)โˆˆ๐œฃ, a point ๐’™=(x1,…,xn)โˆˆโ„n can be written as ๐’™=r๐’—, with ๐’—โˆˆ๐•Šnโˆ’1. To be clear, ๐’—=e(๐œฝ), as given by the above-defined embedding function. The joint density becomes

p(r,๐œฝ|๐,๐œฎ)=rnโˆ’1๐’ฉn(r๐’—โˆฃ๐,๐œฎ)=rnโˆ’1|๐œฎ|(2ฯ€)n2eโˆ’12(r๐’—โˆ’๐)โŠคฮฃโˆ’1(r๐’—โˆ’๐)

where the factor rnโˆ’1 is due to the change of variables ๐’™=r๐’—. The density of ๐’ซ๐’ฉn(๐,๐œฎ) can then be obtained via marginalization over r asTemplate:Sfn

p(๐œฝ|๐,๐œฎ)=โˆซ0โˆžp(r,๐œฝ|๐,๐œฎ)dr.

The same density had been previously obtained in Pukkila and Rao (1988, Eq. (2.4))Template:Sfn using a different notation.

Note on density definition

This subsection gives some clarification lest the various forms of probability density used in this article be misunderstood. Take for example a random variate uโˆˆ(0,1], with uniform density, pU(u)=1. If โ„“=โˆ’log⁡u, it has density, pL(โ„“)=eโˆ’โ„“. This works if both densities are defined with respect to Lebesgue measure on the real line. By default convention:

  • Density functions are Lebesgue-densities, defined with respect to Lebesgue measure, applied in the space where the argument of the density function lives, so that:
  • The Lebesgue-densities involved in a change of variables are related by a factor dependent on the derivative(s) of the transformation (dโ„“/du=eโˆ’โ„“ in this example; and rnโˆ’1 for the above change of variables, ๐’™=r๐’—).

Neither of these conventions apply to the ๐’ซ๐’ฉ๐“ƒ densities in this article:

  • For nโ‰ฅ3 the density, p(๐œฝโˆฃ๐,๐œฎ) is not defined w.r.t. Lebesgue measure in โ„nโˆ’1 where ๐œฝ lives, because that measure does not agree with the standard notion of hyperspherical area. Instead, the density is defined w.r.t. a measure that is pulled back (via the embedding function) to angular coordinate space, from Lebesgue measure in the (nโˆ’1)-dimensional tangent space of the hypersphere. This will be explained below.
  • With the embedding ๐’—=e(๐œฝ), a density, p~(๐’—โˆฃ๐,๐œฎ) cannot be defined w.r.t. Lebesgue measure, because ๐•Šnโˆ’1โˆˆโ„n has Lebesgue measure zero. Instead, p~ is defined w.r.t. scaled Hausdorff measure.

The pullback and Hausdorff measures agree, so that:

p(๐œฝโˆฃ๐,๐œฎ)=p~(๐’—โˆฃ๐,๐œฎ)

where there is no change-of-variables factor, because the densities use different measures.

To better understand what is meant by a density being defined w.r.t. a measure (a function that maps subsets in sample space to a non-negative real-valued 'volume'), consider a measureable subset, UโІ๐œฃ, with embedded image V=e(U)โІ๐•Šnโˆ’1 and let ๐’—=e(๐œฝ)โˆผ๐’ซ๐’ฉ๐“ƒ, then the probability for finding the sample in the subset is:

P(๐œฝโˆˆU)=โˆซUpdฯ€=P(๐’—โˆˆV)=โˆซVp~dh

where ฯ€,h are respectively the pullback and Hausdorff measures; and the integrals are Lebesgue integrals, which can be rewritten as Riemann integrals thus:

โˆซUpdฯ€=โˆซ0โˆžฯ€({๐œฝโˆˆU:p(๐œฝ)>t})dt(1)

Pullback measure

The tangent space at ๐’—โˆˆ๐•Šnโˆ’1 is the (nโˆ’1)-dimensional linear subspace perpendicular to ๐’—, where Lebesgue measure can be used. At very small scale, the tangent space is indistinguishable from the sphere (e.g. Earth looks locally flat), so that Lebesgue measure in tangent space agrees with area on the hypersphere. The tangent space Lebesgue measure is pulled back via the embedding function, as follows, to define the measure in coordinate space. For UโІ๐œฃ, a measureable subset in coordinate space, the pullback measure, as a Riemann integral is:

ฯ€(U)=โˆซU|det⁡(๐„๐œฝ′๐„๐œฝ)|dฮธ1โ‹ฏdฮธnโˆ’1(2)

where the Jacobian of the embedding function, e(๐œฝ), is the n-by-(nโˆ’1) matrix ๐„๐œฝ, the columns of which span the (nโˆ’1)-dimensional tangent space where the Lebesgue measure is applied. It can be shown: |det⁡(๐„๐œฝ′๐„๐œฝ)|=โˆi=1nโˆ’2sinnโˆ’1โˆ’i(ฮธi). When plugging the pullback measure (2), into equation (1) and exchanging the order of integration:Template:Sfn

P(๐œฝโˆˆ๐’ฐ)=โˆซUpdฯ€=โˆซUp(๐œฝโˆฃ๐,๐œฎ)|det⁡(๐„๐œฝ′๐„๐œฝ)|dฮธ1โ‹ฏdฮธnโˆ’1

where the first integral is Lebesgue and the second Riemann. Finally, for better geometric understanding of the square-root factor, consider:

  • For n=2, when integrating over the unitcircle, w.r.t. ฮธ1, with embedding e(ฮธ1)=(cos⁡ฮธ1,sin⁡ฮธ1), the Jacobian is ๐„๐œฝ=[โˆ’sin⁡ฮธ1cos⁡ฮธ1]′, so that |det⁡(๐„๐œฝ′๐„๐œฝ)|=1. The angular differential, dฮธ1 directly gives the subtended arc length on the circle.
  • For n=3, when integrating over the unitsphere, w.r.t. ฮธ1,ฮธ2, we get |det⁡(๐„๐œฝ′๐„๐œฝ)|=sin⁡ฮธ1, which is the radius of the circle of latitude at ฮธ1 (compare equator to polar circle). The area of the surface patch subtended by the two angular differentials is: sin⁡ฮธ1dฮธ1dฮธ2.
  • More generally, for nโ‰ฅ2, let ๐“ be a square or tall matrix and let /๐“/ denote the parallelotope spanned by its colums (which represent the edges meeting at a common vertex). The parallelotope volume is |det⁡(๐“′๐“)|, the square root of the absolute value of the Gram determinant. For square ๐“, the volume simplifies to |det⁡(๐“)|. Now let ๐‘=diag⁡(dฮธ1,โ‹ฏ,dฮธnโˆ’1), so that /๐‘/โˆˆ๐œฃ is a rectangle with infinitessimally small volume, |det⁡(๐‘)|=โˆi=1nโˆ’1dฮธi. Since the smooth embedding function is linear at small scale, the embedded image is the paralleotope, e(/๐‘/)=/๐„๐œฝ๐‘/, with volume (area of the subtended hyperspherical surface patch):|det⁡(๐‘๐„๐œฝ′๐„๐œฝ๐‘)|=|det⁡(๐„๐œฝ′๐„๐œฝ)|dฮธ1โ‹ฏdฮธnโˆ’1.

Circular distribution

For n=2, parametrising the position on the unit circle in polar coordinates as ๐’—=(cos⁡ฮธ,sin⁡ฮธ), the density function can be written with respect to the parameters ๐ and ๐œฎ of the initial normal distribution as

p(ฮธ|๐,๐œฎ)=eโˆ’12๐โŠค๐œฎโˆ’1๐2ฯ€|๐œฎ|๐’—โŠค๐œฎโˆ’1๐’—(1+T(ฮธ)ฮฆ(T(ฮธ))ฯ•(T(ฮธ)))I[0,2ฯ€)(ฮธ)

where ฯ• and ฮฆ are the density and cumulative distribution of a standard normal distribution, T(ฮธ)=๐’—โŠค๐œฎโˆ’1๐๐’—โŠค๐œฎโˆ’1๐’—, and I is the indicator function.Template:Sfn

In the circular case, if the mean vector ๐ is parallel to the eigenvector associated to the largest eigenvalue of the covariance, the distribution is symmetric and has a mode at ฮธ=ฮฑ and either a mode or an antimode at ฮธ=ฮฑ+ฯ€, where ฮฑ is the polar angle of ๐=(rcos⁡ฮฑ,rsin⁡ฮฑ). If the mean is parallel to the eigenvector associated to the smallest eigenvalue instead, the distribution is also symmetric but has either a mode or an antimode at ฮธ=ฮฑ and an antimode at ฮธ=ฮฑ+ฯ€.Template:Sfn

Spherical distribution

For n=3, parametrising the position on the unit sphere in spherical coordinates as ๐’—=(cos⁡ฮธ1sin⁡ฮธ2,sin⁡ฮธ1sin⁡ฮธ2,cos⁡ฮธ2) where ๐œฝ=(ฮธ1,ฮธ2) are the azimuth ฮธ1โˆˆ[0,2ฯ€) and inclination ฮธ2โˆˆ[0,ฯ€] angles respectively, the density function becomes

p(๐œฝ|๐,๐œฎ)=eโˆ’12๐โŠค๐œฎโˆ’1๐|๐œฎ|(2ฯ€๐’—โŠค๐œฎโˆ’1๐’—)32(ฮฆ(T(๐œฝ))ฯ•(T(๐œฝ))+T(๐œฝ)(1+T(๐œฝ)ฮฆ(T(๐œฝ))ฯ•(T(๐œฝ))))I[0,2ฯ€)(ฮธ1)I[0,ฯ€](ฮธ2)

where ฯ•, ฮฆ, T, and I have the same meaning as the circular case.Template:Sfn

Angular Central Gaussian Distribution

In the special case, ๐=๐ŸŽ, the projected normal distribution, with nโ‰ฅ2 is known as the angular central Gaussian (ACG)Template:Sfn and in this case, the density function can be obtained in closed form as a function of Cartesian coordinates. Let ๐ฑโˆผ๐’ฉn(๐ŸŽ,๐œฎ) and project radially: ๐ฏ=โ€–๐ฑโ€–โˆ’1๐ฑ so that ๐ฏโˆˆ๐•Šnโˆ’1={๐ณโˆˆโ„n:โ€–๐ณโ€–=1} (the unit hypersphere). We write ๐ฏโˆผACG⁡(๐œฎ), which as explained above, at ๐’—=e(๐œฝ), has density:

p~ACG(๐ฏโˆฃ๐œฎ)=p(๐œฝโˆฃ0,๐œฎ)=โˆซ0โˆžrnโˆ’1๐’ฉn(r๐ฏโˆฃ๐ŸŽ,๐œฎ)dr=ฮ“(n2)2ฯ€n2|๐œฎ|โˆ’12(๐ฏ′๐œฎโˆ’1๐ฏ)โˆ’n2

where the integral can be solved by a change of variables and then using the standard definition of the gamma function. Notice that:

  • For any k>0 there is the parameter indeterminacy:
p~ACG(๐ฏโˆฃk๐œฎ)=p~ACG(๐ฏโˆฃ๐œฎ).
p~ACG(๐ฏโˆฃk๐ˆn)=puniform=ฮ“(n2)2ฯ€n2

ACG via transformation of normal or uniform variates

Let ๐“ be any n-by-n invertible matrix such that ๐“๐“′=๐œฎ. Let ๐ฎโˆผACG⁡(๐ˆn) (uniform) and sโˆผฯ‡(n) (chi distribution), so that: ๐ฑ=s๐“๐ฎโˆผ๐’ฉn(๐ŸŽ,๐œฎ) (multivariate normal). Now consider:

๐ฏ=๐“๐ฎโ€–๐“๐ฎโ€–=๐ฑโ€–๐ฑโ€–โˆผACG⁡(๐œฎ)

which shows that the ACG distribution also results from applying, to uniform variates, the normalized linear transform:Template:Sfn

f๐“(๐ฎ)=๐“๐ฎโ€–๐“๐ฎโ€–

Some further explanation of these two ways to obtain ๐ฏโˆผACG⁡(๐œฎ) may be helpful:

  • If we start with ๐ฑโˆˆโ„n, sampled from a multivariate normal, we can project radially onto ๐•Šnโˆ’1 to obtain ACG variates. To derive the ACG density, we first do a change of variables: ๐ฑโ†ฆ(r,๐ฏ), which is still an n-dimensional representation, and this transformation induces the differential volume change factor, rnโˆ’1, which is proportional to volume in the (nโˆ’1)-dimensional tangent space perpendicular to ๐ฑ. Then, to finally obtain the ACG density on the (nโˆ’1)-dimensional unitsphere, we need to marginalize over r.
  • If we start with ๐ฎโˆˆ๐•Šnโˆ’1, sampled from the uniform distribution, we do not need to marginalize, because we are already in nโˆ’1 dimensions. Instead, to obtain ACG variates (and the associated density), we can directly do the change of variables, ๐ฏ=f๐“(๐ฎ), for which further details are given in the next subsection.

Caveat: when ๐ is nonzero, although s๐“๐ฎ+๐โˆผ๐’ฉd(๐,๐œฎ), a similar duality does not hold:

๐“๐ฎ+๐โ€–๐“๐ฎ+๐โ€–โ‰ s๐“๐ฎ+๐โ€–s๐“๐ฎ+๐โ€–โˆผ๐’ซ๐’ฉn(๐,๐œฎ)

Although we can radially project affine-transformed normal variates to get ๐’ซ๐’ฉn variates, this does not work for uniform variates.

Wider application of the normalized linear transform

The normalized linear transform, ๐ฏ=f๐“(๐ฎ), is a bijection from the unitsphere to itself; the inverse is ๐ฎ=f๐“โˆ’1(๐ฏ). This transform is of independent interest, as it may be applied as a probabilistic flow on the hypersphere (similar to a normalizing flow) to generalize also other (non-uniform) distributions on hyperspheres, for example the Von Mises-Fisher distribution. The fact that we have a closed form for the ACG density allows us to recover also in closed form the differential volume change induced by this transform.

For the change of variables, ๐ฏ=f๐“(๐ฎ) on the manifold, ๐•Šnโˆ’1, the uniform and ACG densities are related as:Template:Sfn

p~ACG(๐ฏโˆฃ๐œฎ)=puniformR(๐ฏ,๐œฎ)

where the (constant) uniform density is puniform=ฮ“(n/2)2ฯ€n/2 and where R(๐ฏ,๐œฎ) is the differential volume change factor from the input to the output of the transformation; specifically, it is given by the absolute value of the determinant of an (nโˆ’1)-by-(nโˆ’1) matrix:

R(๐ฏ,๐œฎ)=abs⁡|๐๐ฏ′๐‰๐ฎ๐๐ฎ|

where ๐‰๐ฎ is the n-by-n Jacobian matrix of the transformation in Euclidean space, f๐“:โ„nโ†’โ„n, evaluated at ๐ฎ. In Euclidean space, the transformation and its Jacobian are non-invertible, but when the domain and co-domain are restricted to ๐•Šnโˆ’1, then f๐“:๐•Šnโˆ’1โ†’๐•Šnโˆ’1 is a bijection and the induced differential volume ratio, R(๐ฏ,๐œฎ) is obtained by projecting ๐‰๐ฎ onto the (nโˆ’1)-dimensional tangent spaces at the transformation input and output: ๐๐ฎ,๐๐ฏ are n-by-(nโˆ’1) matrices whose orthonormal columns span the tangent spaces. Although the above determinant formula is relatively easy to evaluate numerically on a software platform equipped with linear algebra and automatic differentiation, a simple closed form is hard to derive directly. However, since we already have p~ACG, we can recover:

R(๐ฏ,๐œฎ)=|๐œฎ|12(๐ฏ′๐œฎโˆ’1๐ฏ)n2=abs⁡|๐“|โ€–๐“๐ฎโ€–n

where in the final RHS it is understood that ๐œฎ=๐“๐“′ and ๐ฎ=f๐“โˆ’1(๐ฏ).

The normalized linear transform can now be used, for example, to give a closed-form density for a more flexible distribution on the hypersphere, that is generalized from the Von Mises-Fisher. Let ๐ฑโˆผVMF(๐,ฮบ) and ๐ฏ=f๐“(๐ฑ); the resulting density is:

p(๐ฏโˆฃ๐,ฮบ,๐“)=p~VMF(๐ŸTโˆ’1(๐ฏ)โˆฃ๐,ฮบ)R(๐ฏ,๐“๐“′)

See also

References

Template:Reflist

Sources