I have a set of data with x and y values (scatter plot) and I'm trying to get their mean (centroid) and median point. The way I did this was by simply calculating the means and the medians on x and y and those were (i thought) the coordinates of the mean and median points of the group. However I did some reading on 2d medians (a.k.a. 1-median) and as it turns out this is some super complex math problem that doesn't even have a specific answer, but can only be approximated. I'm not sure if that's what I should be using, or if calculations I did are good for me.

  • $\begingroup$ As you can probably tell I'm not very math. So what I'm getting at is; is calculating a simple median for both axes ever good for describing this dataset, or is the geometric median the only median that exists for such datasets. $\endgroup$
    – Szkeptik
    May 11, 2017 at 13:20

1 Answer 1


As far as the mean/centroid is concerned, getting the average of $x$ and the average of $y$ is right. Regarding the median, if what you are interested is the geometric median (i.e the point which minimizes the sum of absolute distances to all other points), then calculating the median of $x$ and the median of $y$ is not correct. The Wikipedia page on the Geometric Median offers more information whereas depending on the software you'll use, there are packages/libraries that calculate it (for R there's the Gmedian package, for example).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.