# "Thinning" a sample until its distribution matches another distribution

I am an astronomer studying galaxies. I have observations of about 500 galaxies. For each galaxy, I can measure two quantities (call them $$X$$ and $$Y$$).

I want to compare my observations to some theoretical (physical, not statistical) models. I have about 10,000 numerical models of all kinds of galaxies (describing their size, structure, and observable properties), some of which are quite different than the ones I am studying.

I want to "thin down" the sample of theoretical models until the distributions of $$X$$ and $$Y$$ across all the models look like the observed distributions of $$X$$ and $$Y$$. Is there a good algorithm to do this?

• Why would you want to do this? What would you learn? Jan 8 '19 at 14:55
• @jbowman My telescope is not sensitive to certain things, and so the sample of galaxies I have observed are not representative of the true sample of galaxies in the Universe. In astronomy we refer to this as the selection function. Galactic studies actually usually perform this step, but manually and often in some ad hoc way. So I was just wondering if the statisticians have a better way of doing it... Jan 8 '19 at 14:57
• Maybe you should edit the question to clarify exactly what a "model" is. In Statistics the term "model" usually refers to a probability distribution that generates data. Jan 8 '19 at 16:39
• Couldn't you view your set of physical models as describing (more or less) a space of statistical models in which observational error is incorporated? That would make your situation amenable to standard approaches, of which the most appealing might be Maximum Likelihood: simply compute the likelihood of your data for each of your models, identify the one that produces the largest likelihood, and select those those likelihoods are reasonably close to the largest one (using the usual chi-squared theory).
– whuber
Jan 9 '19 at 14:46
• I'm having a very hard time making sense of that request, because I understand all models to differ: no more than one can "belong to the same population." Regardless, my suggestion was not to select the best fit, but to select a subset of models that all fit reasonably well compared to the best fit.
– whuber
Jan 9 '19 at 16:24