{{short description|Computational geometry concept}} <!-- {{More sources needed|date=March 2020}} --> {{one source |date=May 2024}} In [[statistics]] and [[computational geometry]], the '''Tukey depth''' <ref>{{cite book |last1=Tukey |first1=John W |title=Mathematics and the Picturing of Data |date=1975 |publisher=Proceedings of the International Congress of Mathematicians |page=523-531}}</ref> or '''half-space depth''' is a measure of the depth of a point in a fixed set of points. The concept is named after its inventor, [[John Tukey]]. Given a set of ''n'' points <math>\mathcal{X}_n = \{X_1,\dots,X_n\}</math> in ''d''-dimensional space, Tukey's depth of a point ''x'' is the smallest fraction (or number) of points in any closed [[Half-space (geometry)|halfspace]] that contains&nbsp;''x''.

Tukey's depth measures how extreme a point is with respect to a point cloud. It is used to define the [[bagplot]], a bivariate generalization of the [[boxplot]].

For example, for any extreme point of the [[convex hull]] there is always a (closed) halfspace that contains only that point, and hence its Tukey depth as a fraction is 1/n.

== Definitions ==

[[File:Tukey's halfspace depth.pdf|thumb|Tukey's depth of a point x wrt to a point cloud. The blue region illustrates a halfspace containing x on the boundary. The halfspace is also a most extreme one so that it contains x but as few observations in the point cloud as possible. Thus, the proportion of points contained in this halfspace becomes the value of Tukey's depth for x.]] ''Sample Tukey's depth'' of point ''x'', or Tukey's depth of ''x'' with respect to the point cloud <math>\mathcal{X}_n</math>, is defined as

<math> D(x;\mathcal{X}_n) = \inf_{v\in\mathbb{R}^d, \|v \|=1} \frac{1}{n}\sum_{i=1}^n \mathbf{1}\{ v^T (X_i - x) \ge 0\}, </math>

where <math>\mathbf{1}\{\cdot\}</math> is the [[indicator function]] that equals 1 if its argument holds true or 0 otherwise.

''Population Tukey's depth'' of ''x'' wrt to a distribution <math>P_X</math> is

<math> D(x; P_X) = \inf_{v\in\mathbb{R}^d, \|v \|=1} P(v^T (X - x) \ge 0), </math>

where ''X'' is a random variable following distribution <math>P_X</math>.

== Tukey mean and relation to centerpoint ==

A centerpoint ''c'' of a point set of size ''n'' is nothing else but a point of Tukey depth of at least ''n''/(''d''&nbsp;+&nbsp;1).

== See also ==

* [[Centerpoint (geometry)]]

==References== {{Reflist}}

[[Category:Computational geometry]]

{{statistics-stub}} {{geometry-stub}}