# N-sphere chord length distribution

This work studies the chord length distribution, in the case where both ends lie on a N-dimensional hypersphere (N ≥ 2). Actually, after connecting this distribution to the recently estimated surface of a hyperspherical cap SLi11, closed-form expressions of both the probability density function and the cumulative distribution function are straightforwardly extracted, which are followed by a discussion on its basic properties, among which its dependence from the hypersphere dimension. Additionally, the distribution of the dot product of unitary vectors is estimated, a problem that is related to the chord length.

## Authors

• 5 publications
05/09/2021

### On the Distribution of the Information Density of Gaussian Random Vectors: Explicit Formulas and Tight Approximations

Based on the canonical correlation analysis we derive series representat...
12/03/2019

### Moments of Student's t-distribution: A Unified Approach

In this note, we derive the closed form formulae for moments of Student'...
02/10/2021

### On the Distribution of the Sum of Double-Nakagami-m Random Vectors and Application in Reconfigurable Intelligent Surfaces

Reconfigurable intelligent surfaces (RISs) intend to improve significant...
01/17/2020

### Globe-hopping

We consider versions of the grasshopper problem (Goulko and Kent, 2017) ...
04/12/2020

### Measuring spatial uniformity with the hypersphere chord length distribution

Data uniformity is a concept associated with several semantic data chara...
11/02/2020

### New Results for Pearson Type III Family of Distributions and Application in Wireless Power Transfer

Pearson and log Pearson type III distributions have been considered in s...
07/13/2020

### The Distribution Function of the Longest Head Run

In this paper, the open problem of finding a closed analytical expressio...
##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## I Introduction

The chord length distribution, when its ends lie on a locus, is a rather challenging problem, which still is only partially solved at present. However, recently a number of researchers have established closed-form solutions for a number of special locus types, such as the chord length distribution of a regular polygon [1], a parallelogram [6] and a cube [5]. Additionally, properties of the distribution in more generic scenarios have been examined and modelled, such as the average chord length in a compact convex subset of a n-dimensional Euclidean space [2].

The chord length distribution of a hypersphere is still not available, even though it presents not only mathematical interest, but also can be employed in a multitude of applications. For example, since by default normalised vectors lie on a hypersphere of radius , the -sphere chord length distribution could be used as a “randomness” benchmark to give a hint whether a set of normalised vectors is selected uniformly and independently. On the other hand, in applications where the input data are known only through their distances, the detection of

-dimensional hyperspheres through their “chord distribution footprint” could provide a low boundary in the dimension of the unknown input data. Moreover, this distribution could be used to train classifiers only with positive examples in cases where the negative examples can be modelled as uniform and independently selected distances.

Recently, S. Li achieved to produce a closed-form expression of the surface of a hyperspherical cap [3]. In this formula the hyperspherical-cap surface is given as a fraction of the total hypersphere surface. In this work it is proven that the chord length distribution in a hypersphere reduces to the ratio of the hyperspherical-cap surface over the total hypersphere surface. This proof, along with the resulting probability density function (pdf) and cumulative distribution function (cdf) are introduced in Section II, followed by the properties of the new distribution, as well as its dependence from the hypersphere dimension , in Section III-A. The (determined from the chord length distribution) unitary vector dot product distribution is examined in Section IV, while, Section V concludes this work.

## Ii N-sphere chord length distribution

Let be points selected uniformly and independently from the surface of a -dimensional hypersphere of radius , i.e., . The pairwise Euclidean distances of , generate a set of distances (). We would like to estimate the distribution that the distance values follow. Since the distances are invariant to the coordinate system, it is assumed that this is selected so as the first end of the chord is always . The second end of the chord determines the chord length.

When the hypersphere is a circle and the objective degenerates to the known (e.g., [7]) circle chord length distribution. As a matter of fact, the pdf and the cdf are given by the following formulas:

 f2(d)=1π1√1−d22R2 (1)
 F2(d)=cos−1(1−d22R2)π (2)

However, in the general case (i.e., when ) there are no closed-forms expressions giving neither the pdf nor the cdf . In this paper we introduce these formulas. In order to achieve this, we need to prove that

###### Proposition II.1.

The locus of the -sphere points that have a constant distance from a fixed point on it is a -sphere of radius .

###### Proof.

The fixed point have coordinates . Then the points of the hypersphere that have distances from have coordinates that satisfy the following two equations:

 x21+x22+...+x2N=R2 (3)
 x21+x22+...+(xN−R)2=d2 (4)

By the above equations it follows that

 R2−2RxN=d2−R2, (5)

By replacing to Eq. (3) we get that

 x21+x22+...+x2(N−1)=d2−d44R2 (6)

The -sphere of Eq. (6) is the intersection of the

-sphere with the hyperplane

. Since , all points of the N-sphere with distance from , , lie “northern” to the -sphere (i.e., have larger value than the points in ), while all points with distance from , , lie “southern” to the -sphere. It can be deduced that the above hyperplane cuts the hypersphere into two parts, each defined by the distance from being smaller or larger than . By default, a hyperspherical cap is defined as the portion of a hypersphere that is cut by a hyperplane, thus the two above parts are hyperspherical caps. Consequently, it was shown that

###### Proposition II.2.

The locus of the -sphere points that have distance , from a point on it is a hyperspherical cap of radius .

Since the maximum distance the cap radius and the cap height form a right triangle (Fig. 1), the height of the cap is

 h=d22R (7)

Recently it was proven from S. Li [3] that the surface of a hyperspherical cap (that is smaller than a hyper-hemisphere, i.e., ) is given by the following formula:

 AcapN(R)=12AN(R)Isin2ϕ(N−12,12) (8)

In Eq. (8), is the hypersphere dimension, its radius, the hypersphere surface, the colatitude angle [3] and the regularised incomplete beta function given by

 Ix(a,b)=B(x;a,b)B(a,b)=∫x0ta−1(1−t)b−1dt∫10ta−1(1−t)b−1dt (9)

The colatitude angle, the sphere radius and the hyperspherical cap satisfy the following [3]:

 h=(1−cosϕ)R (10)

By replacing from Eq. (7) it follows that

 ϕ=cos−1(1−d22R2) (11)

Finally, from Proposition II.2, Eq. (8) and Eq. (11) it is deduced that

###### Proposition II.3.

The cumulative distribution function of the -sphere chord length is

###### Proposition II.4.

The probability density function of the -sphere chord length is:

 fN(d)=dR2B(N−12,12)(d2R2−d44R4)N−32 (13)

## Iii Some properties of the normalised vector distance distribution

Equations (12) and (13) give the cdf and the pdf of the -sphere chord length distribution, respectively. In this section, some of its basic properties are examined. Furthermore, we discuss how these properties vary with , especially when .

### Iii-a Basic properties

Eq. (12) suggests that the pdf , and are as follows:

 f3(d)=d2R2, (14)
 f4(d)=4d2πR3√1−d24R2, (15)
 f5(d)=3d34R4(1−d24R2) (16)

while the cdf , and are

 F3(d)=d24R2, (17)
 F4(d)=cos−1(1−d22R2)π−2π(1−d22R2)√1−d24R2, (18)
 F5(d)=3d416R4−3d696R6, (19)

When , then . Since , Eq. (12) implies that , i.e., that

###### Proposition III.1.

The median value of the -sphere chord length distribution is independent of and equal to .

The probability density functions and cumulative distribution functions for are shown in Figs. 2 and 3

, respectively. In order to estimate the distribution moments, we use the variable transform

, which leads to the following formula:

 μk=2k+N−2B(N−12,12)B(k+N−12,N−12)Rk (20)

Eq. (20) gives the order moment of the -sphere chord length distribution. For , the mean value is given by

###### Proposition III.2.

The mean value of the -sphere chord length distribution is

 μ=B(N2,N2)B(N−12,12)2N−1R (21)

On the contrary, for the second order moment the following proposition stands:

###### Proposition III.3.

The second order moment of the -sphere chord length distribution is independent of and equal to .

###### Proof.

By replacing in Eq. (20) we obtain the following:

 μ2=2NR2B(N+12,N−12)B(N−12,12)=2NR2Γ(N2)Γ(N+12)Γ(12)Γ(N) (22)

where is the gamma function. Since it is known that for all the following property stands [8]:

 Γ(z)Γ(z+12)Γ(12)Γ(2z)=21−2z (23)

By replacing in Eq. (22) it follows that . ∎

Propositions III.3 and III.2

imply that the variance

is

 σ2=(2−B2(N2,N2)B2(N−12,12)22N−2)R2=(2−Γ4(N2)πΓ2(N−12)22N−2)R2 (24)

Finally, it should be noted that the Bertrand problem [4], which refers to the probability of a random chord being larger than the radius, can be answered by replacing in Eq. (12), i.e.,

 PR=P(d≤R)=12I34(N−12,12) (25)

Fig. 4 demonstrates as a function of . More results about the chord length distribution dependence from the hypersphere dimension are given in the next sub-section.

### Iii-B Dependence from the hypersphere dimension

The cdf of Eq. (12) can be recursively estimated using the following formula for regularised incomplete beta functions:

 Ix(a+1,b)=Ix(a,b)−xa(1−x)baB(a,b) (26)

In the -sphere chord length distribution case , and . is a variable that takes values in the interval [0,1] when . This signifies that the second term of the right part of Eq. (26) is always positive in the interval , i.e., that the cdf scores that correspond to a fixed reduce with . Similarly, when the second term of the right part of Eq. (26) is always negative, which means that the cdf scores that correspond to a fixed increase with . Summarising:

###### Proposition III.4.

If is the probability that a chord length is smaller than , when both chord ends lie on a hypersphere of radius and dimension then

• If , then ,

• If , then .

Proposition III.4

can be used to bound the degrees of freedom in cases where the only input data are dissimilarity scores, if a process for generating uniform and independent scores is available. Moreover, the above proposition implies that as the dimension increases the pdf of Eq. (

13) becomes more concentrated around (Fig. 3).

The latter is established through the following property of :

###### Proposition III.5.
 limN→∞μ=√2R
###### Proof.

The Stirling approximation for factorials suggests that

 limN→∞N!=√2πNN+12e−N (27)

Through Stirling approximation, Eq. (21) becomes

 limN→∞μ=limN→∞√2π[(N2)N−12]2√N−12√πNN−122N−1R (28)

i.e.,

 limN→∞μ=limN→∞√2R√N−12√N=√2R (29)

It follows from propositions III.3 and III.5 that the variance limit when the dimension approaches infinity is zero, i.e.,

###### Proposition III.6.
 limN→∞σ2=0

Figures 5 and 6 show and as a function of , respectively. From proposition III.6 it follows that as the dimension increases the hypersphere chord lengths are concentrated within a small range around . In order to give a quantitative measure of the chord length range, the difference between the largest and the smallest

-quantile is employed. Note that this distance denotes the length of the interval from which the

most central values are selected. The results are shown on Table I. Table I demonstrates that when most chord lengths lie within a small range around . For example, the of chord lengths of a 256-sphere lie inside an interval of length around , i.e., an interval that spans only of the available distance range.

An intuitive analysis of the distribution change with can be done by considering the 3-dimensional sphere as a globe. In this case, the fixed point is on the North Pole, and the points having distance from are the points in the equator. Seen under this prism, the concentration of the distribution around denotes an expansion of the equatorial areas, in expense of the high latitude areas. Ideally, when “almost all” points of the hypersphere lie in the equator (meaning that the set of points within distance have infinitely more points than the set of points with distance either larger or smaller than ).

## Iv Unitary vector dot product distribution

In the hypersphere of radius the distance of two points and and the dot product of the vectors and (where is the centre of the hypersphere) are connected via the following relation:

 d212=2−2→u1⋅→u2 (30)

Since the distance distribution is already known, the dot product distribution can be estimated through Eq. (30). As a matter of fact, if is the cdf of the unitary dot product then

 FC(c)=P(C≤c)=P((1−d2122)≤c)=P(d212≥2−2c) (31)

values are always positive, thus the above equation can be reformulated as

 FC(c)=P(d12≥√2−2c)=1−P(d12≤√2−2c)=1−Fd(√2−2c) (32)

By replacing in Eq. (12) it follows that

 FC(c)=1−12I1−c2(N−12,12),c≤0FC(c)=12I1−c2(N−12,12),c≥0 (33)

The corresponding pdf is

 fC(c)=(1−c2)N−32B(N−12,12) (34)

The pdf is symmetric around

, thus all odd-order moments (among which, the average) are independent of

and equal to 0. For the even-order moments, i.e., when , the following formula stands:

 μ2λ=B(λ+12,N−12)B(12,N−12) (35)

## V Conclusions

In this paper, the probability distribution that follow the

-sphere chord lengths was introduced. After estimating the pdf and the cdf, some of its basic properties were examined, among which its dependency from the dimension of the hypersphere. Starting from it, the distribution of the dot product of two randomly selected unitary vectors was also estimated.

## References

• [1] U. Basel. Random chords and points distances in regular polygons. Acta Mathematics Universitatis Comeniae, 83(1):1–18, 2014.
• [2] B. Burgstaller and F. Pillichshammer. The average distance between two points. Bulletin of the Australian Mathematical Society, 80:353–359, 2009.
• [3] S. Li. Concise formulas for the area and volume of a hyperspherical cap. Asian Journal of Mathematics and Statistics, 4(1):66–70, 2011.
• [4] A. Papoulis.

Probability, Random Variables, and Stochastic Processes

.
McGraw-Hill, 1984.
• [5] J. Philip. The probability distribution of the distance between two random points in a box. Technical report, Royal Institute of Technology, Stockholm, 2007.
• [6] S. Ren. Chord length distribution of parallelograms. Master’s thesis, China: Wuhan University of Science and Technology, May 2012.
• [7] E. Weisstein. Circle line picking, from mathworld–a wolfram web resource.
• [8] E. Weisstein. Gamma function, from mathworld–a wolfram web resource.