Can the Kolmogorov-Smirnov statistic be used to check if these Disclaimer: Note this is a simplified version of my actual problem. These are not my real data.
The set up
The hexbin plot shows mass and height of goats in Iceland. There are a few thousand samples.
I measure the mass and height of goats in Japan. These are shown by the red dots. There are far fewer samples.
The problem
My hypothesis is the measurements of the Japanese goats and the Icelandic goats are from the same underlying sample.
I was going to use the Kolmogorov-Smirnov two-sample test to test for this, but one of the distributions is far from continuous. I can just use a chi-square goodness of fit test either.
Is there a different test I can do to show goat_Japan = goat_iceland?

 A: As mentioned by others, it looks like a classical case for two-dimensional Kolmogorov-Smirnov, first published by J. A. Peacock, Two-dimensional goodness-of-fit testing in astronomy, Monthly Notices Royal Astronomy Society 202 (1983) 615–627. Free PDF
Here few additional references not mentioned so far:


*

*Lopes et al. 'The two-dimensional Kolmogorov-Smirnov test'. Great discussion of all relevant implementation to date. Free PDF here.

*Recent fast implementation of the test by Xiao 'A fast algorithm for two-dimensional Kolmogorov–Smirnov two sample tests', Computational Statistics and Data Analysis 105 (2017) 53–58. link to PDF. R package

*Matlab implementation by Muir can be found here

*Cooke's algorithm mentioned by Lopes et al. can be found here

*and last but not least it's covered in Numerical Recipes link
Also wanted to mention the 'earth mover distance', EMD, https://en.wikipedia.org/wiki/Earth_mover%27s_distance which is an alternative solution. “EMD is a measure of the distance between two probability distributions over a region D. In mathematics, this is known as the Wasserstein metric.” Python code is available here. 
A: Dave pointed me along the right lines in a comment to the question, and cleared up some confusion. I believe I found an answer (with a Python script to do it) here.
