Why Simplicial Depth Uses Simplexes
In one dimension, an interval gives a natural way to ask whether a point lies among typical observations. In higher dimensions, a simplex—the triangle in two dimensions, or its higher-dimensional analogue—provides a corresponding geometric reference. Simplicial depth measures how often a point is captured by a simplex whose vertices are random observations. A point contained in many such simplexes is relatively central with respect to the distribution; a point contained in few is relatively peripheral.
Unlike a rank based on a single coordinate, simplicial depth uses the joint geometry of the observations. The direction and shape of a cloud therefore matter. Depth is an ordering device, not a complete description of a distribution: different points can have the same depth, and a depth value alone does not identify a unique location or group difference.
The probability definition permits repeated values among independent draws if \(P\) has atoms. The sample definition, in contrast, selects distinct observation indices; tied observation values can still occur, and degenerate simplexes are allowed. These conventions make the definition usable without imposing a general-position condition. Such a condition may simplify geometric computations, but it is not needed to define depth.
Depth and Ranks in One Dimension
When \(d=1\), a simplex formed from two observations is the interval between them. If \(P\) is continuous with distribution function \(F\), the population depth has a simple expression. The interval contains \(x\) exactly when one draw is at or below \(x\) and the other is at or above \(x\). Continuity gives \(P(X_i=x)=0\), so
This formula is largest at \(F(x)=1/2\), where the depth is \(1/2\), and decreases toward either tail. For a sample of distinct ordered values \(X_{(1)}<\cdots<X_{(n)}\), the sample depth at \(X_{(k)}\) can also be counted directly. Of the \(\binom{n}{2}\) pairs, a pair fails to span \(X_{(k)}\) only if both observations lie strictly below it or both lie strictly above it. Thus
Worked Example: Computing a One-Dimensional Sample Depth
Suppose the ordered sample is \(2,5,8,11,14\). There are \(\binom{5}{2}=10\) pairs. For the observation \(8=X_{(3)}\), a pair fails to contain 8 only if both values are below 8 or both are above 8. There is one pair below, \((2,5)\), and one pair above, \((11,14)\). Therefore eight pairs contain 8:
At the smallest observation, 2, every containing pair must include 2, so there are four such pairs and \(D_{S,5}(2)=4/10=0.4\). The middle observation is deeper than the endpoint in this sample. The calculation depends on the pair spanning the point, not on the numerical distance between the observations.
For multivariate samples, the same principle applies, but the counted objects are \((d+1)\)-vertex simplexes. To turn depth values into ranks, compute each observation's depth relative to a specified reference sample. A convenient convention gives larger scores to deeper observations and handles tied depths by midranks.
Worked Example: Counting Triangles in a Planar Sample
Take four sample points forming a square: \(A=(0,0)\), \(B=(1,0)\), \(C=(1,1)\), and \(D=(0,1)\). There are \(\binom{4}{3}=4\) triangles. Find the sample simplicial depth of \(x=(0.4,0.5)\).
The four triangles are formed by omitting one square vertex at a time. If \(A\) is omitted, the triangle lies on the side \(u+v\ge 1\) of the diagonal from \(B\) to \(D\). Since \(0.4+0.5=0.9<1\), it does not contain \(x\). If \(B\) is omitted, the triangle has vertices \(A,C,D\); \(x\) lies inside it because \(0.4\le 0.5\), placing it on the \(u\le v\) side of the diagonal from \(A\) to \(C\). If \(C\) is omitted, the triangle \(A,B,D\) contains \(x\), since \(0.4+0.5=0.9\le1\). If \(D\) is omitted, the triangle lies on the \(v\le u\) side of the diagonal from \(A\) to \(C\), which \(x\) does not satisfy. Exactly two of the four triangles contain \(x\), so
This example uses the boundary-inclusive convention, though \(x\) is not on any of the relevant boundaries. In other configurations a query point may lie on a triangle edge; that triangle counts as containing it.
Two Properties That Support Interpretation
The sample depth is a direct empirical version of the population probability. Under independent sampling, its expectation equals the population depth. This statement needs no density assumption or general-position condition.
Proof. Write \(h_x(X_{i_1},\ldots,X_{i_{d+1}})\) for the indicator that the simplex formed by the indexed observations contains \(x\). By the definition of sample depth and linearity of expectation,
For every subset of \(d+1\) distinct indices, the corresponding observations are independent with common distribution \(P\). Each expectation in the sum is therefore \(P\{x\in\operatorname{conv}(X_1,\ldots,X_{d+1})\}=D_S(x;P)\). There are exactly \(\binom{n}{d+1}\) terms, so their average is \(D_S(x;P)\). \(\square\)
Simplicial depth also respects changes of coordinates that are invertible affine transformations. This matters because the definition is geometric rather than tied to a particular origin or coordinate system.
Proof. For any points \(z_1,\ldots,z_{d+1}\), an affine map sends their convex hull to the convex hull of their images: \(T\{\operatorname{conv}(z_1,\ldots,z_{d+1})\} =\operatorname{conv}(Tz_1,\ldots,Tz_{d+1})\). Because \(T\) is one-to-one, \(x\) belongs to the first convex hull if and only if \(Tx\) belongs to the second. Applying this equivalence to independent observations from \(P\) and their transformed versions gives equal probabilities. Applying it to every subset of a fixed sample gives equal sample depths as well. \(\square\)
Using Pooled Depth Ranks to Compare Groups
For a descriptive comparison of groups, calculate each observation's depth relative to the pooled observations, then compare the resulting depth distributions or group summaries. This uses a common geometric reference: a high pooled depth rank means that an observation is relatively central among the combined sample. A group with generally lower pooled depths lies more often toward the periphery of that pooled configuration.
The comparison concerns centrality relative to the pooled data, not a universal notion of separation. In particular, lower pooled depth does not by itself establish a statistically significant group difference. The inferential procedures for testing depth-based group differences require additional design and calibration considerations.
Worked Example: Comparing Pooled Centrality in Two Groups
Consider eight distinct one-dimensional observations in increasing order. The first three belong to group A, and the last five to group B. Because there are \(\binom{8}{2}=28\) pairs, the sample depths at ordered positions \(k=1,\ldots,8\), using the earlier counting formula, are
For example, at \(k=3\), \(28-\binom{2}{2}-\binom{5}{2}=28-1-10=17\) would appear to be the count, so check the formula carefully: the number below position 3 is 2 and the number above is 5, hence the count is \(28-1-10=17\). The full correct sequence is therefore
The group A depth counts are \(7,13,17\), with mean \(37/3\) pairs out of 28. Group B counts are \(19,19,17,13,7\), with mean \(75/5=15\) pairs out of 28. Thus the average pooled depth is \(37/84\approx0.440\) in group A and \(15/28\approx0.536\) in group B. Under the stated centrality-rank convention, the observations at positions 4 and 5 are tied at the maximum depth, and the midranks likewise assign tied observations the same score. Group B is more central on average in this pooled reference, although both groups include peripheral observations. This is a descriptive comparison; the different group sizes and the particular pooled arrangement are part of its interpretation.
Common Pitfalls and Practical Meaning
A tempting but incorrect shortcut is to treat the depth of a point as the proportion of sample observations near it. Simplicial depth is not a nearest-neighbor count: it is a proportion of \((d+1)\)-observation simplexes that contain the point. A point can be close to many observations yet lie outside most of the simplexes they form, or be farther from individual observations but still lie in many convex hulls. The correction is to follow the definition and count containing simplexes.
Another mistake is to calculate group A depths relative to group A and group B depths relative to group B, then compare the values as if they shared a reference. Those calculations answer different geometric questions. For a pooled centrality comparison, calculate both groups' depths relative to the same pooled sample. Also state how ties are handled: equal depths do not justify an arbitrary ordering, and midranks preserve their equality.
Simplicial depth ranks are useful when a multivariate ordering is needed without reducing observations to one coordinate. They can summarize which group tends to occupy more central positions in a pooled cloud and which tends toward its outskirts. But a rank summary discards geometric detail: two groups may have similar depth ranks while differing in orientation, spread, or shape. Interpret ranks alongside the data configuration and the question being asked, rather than treating them as a complete account of group separation.
Check Your Understanding
Answer each question using the definitions and counting arguments above.
- In \(\mathbb{R}^d\), how many independently drawn vertices define a simplex in the population simplicial depth?
- Why does the sample simplicial depth divide by \(\binom{n}{d+1}\), rather than by the number of all ordered selections of vertices?
- For a continuous one-dimensional distribution, what is the population simplicial depth at a point with \(F(x)=0.25\)?
- What does affine invariance say about depth after an invertible change of coordinates?
- Why should both groups use the pooled sample as the reference when their pooled centrality ranks are compared?