difference between median and midrange
While the mean of a set of values minimizes the sum of squares of deviations and the median minimizes the average absolute deviation, the midrange minimizes the maximum deviation (defined as max | x i â m | {\displaystyle \max \left|x_{i}-m\right|} ): it is a solution to a variational problem.