Index: /trunk/doc/Statistics.doxygen
===================================================================
--- /trunk/doc/Statistics.doxygen (revision 1153)
+++ /trunk/doc/Statistics.doxygen (revision 1154)
@@ -302,5 +302,41 @@
and calculating the weighted median of the distances.
-\section Distance
+\section Distance
+
+A Distance measures how far apart two ranges are. A Distance should
+preferably meet some criteria:
+
+ - It is symmetric, \f$ d(x,y) = d(y,x) \f$, that is distance from \f$
+ x \f$ to \f$ y \f$ equals the distance from \f$ y \f$ to \f$ y \f$.
+ - Zero self-distance: \f$ d(x,x) = 0 \f$
+ - Triangle inequality: \f$ d(x,z) \le d(x,y) + d(y,z) \f$
+
+\subsection weighted_distance Weighted Distance
+
+Weighted Distance is an extension of usual unweighted distances, in
+which each data point is accompanied with a weight. A weighted
+distance should meet some criteria:
+
+ - Having all unity weights should yield the unweighted case.
+ - Rescaling invariant - \f$ w_i = Cw_i \f$ does not change the distance.
+ - Having a \f$ w_x = 0 \f$ the distance should ignore corresponding
+ \f$ x \f$, \f$ y \f$, and \f$ w_y \f$.
+ - A zero weight should not result in a very different distance than a
+ small weight, in other words, modifying a weight should change the
+ distance in a continuous manner.
+ - The duplicate property. If data is coming in duplicate such that
+ \f$ x_{2i}=x_{2i+1} \f$, then the case when \f$ w_{2i}=w_{2i+1} \f$
+ should equal to if you set \f$ w_{2i}=0 \f$.
+
+For a weighted distance, meeting these criteria, it might be difficult
+to show that the triangle inequality is fulfilled. For most algorithms
+the triangle inequality is not essential for the distance to work
+properly, so if you need to choose between fulfilling triangle
+inequality and these latter criteria it is preferable to meet the
+latter criteria. Here follows some examples:
+
+\subsection EuclideanDistance
+
+\subsection PearsonDistance
\section Kernel