Economic statistics, finance, unemployment data—the context hardly matters: on the graph or the screen in your hands, the figures roll in one after another. You are looking at a univariate data set: the values of a single numerical variable measured (in euros, hours, percentages, kilometres, degrees Celsius…) for a number n of individuals drawn from a homogeneous population and forming what is known as a sample. All the measurements can be viewed as a point X in an n-dimensional space, with coordinates X = ( x1, x2… *xn ). Let A be a point in the same space ℝn whose coordinates are all identical, namely A = (a, a… a*).
What is the distance d between these two points?
Using Euclidean distance, we naturally obtain:
d2=∑i=1n(xi−a)2.
One point A is of particular interest: the one at minimum distance from X. To find its coordinates, we need only consider the function that maps the parameter a to d 2 (a) and set its first derivative equal to zero.