Automated procedure for selecting subset of data points w/ strongest correlation? Is there some standard procedure (such that one might cite it as a reference) for selecting the subset of data points from a larger pool with the strongest correlation (along just two dimensions)?
For instance, say you have 100 data points. You want a subset of 40 points with the strongest correlation possible along the X and Y dimensions.
I realize that writing code to do this would be relatively straightforward, but I'm wondering if there's any source to cite for it?
 A: The RANSAC algorithm sounds like what you want. Basically, it assumes your data consists of a mix of inliers and outliers, and tries to identify the inliers by repeatedly sampling subsets of the data, fitting a model to it, then trying to fit every other data point to the model. Here's the wikipedia article about it.
In your case, you can just keep repeating the algorithm while saving the current best model that fits at least 40 points, so it won't guarantee you the absolute best correlation, but it should get close.
A: I would say that your method fits into the general category described in this wikipedia article which also has other references if you need something more than just wikipedia.  Some of the links within that article would also apply.
Other terms that could apply (if you want to do some more searching) include "Data Dredging" and "Torturing the data until it confesses".
Note that you can always get a correlation of 1 if you just choose 2 points that don't have identical x or y values.  There was an article in Chance magazine a few years back that showed when you have an x and y variable with essentially no correlation you can find a way to bin the x's and average the y's within the bins to show either an increasing or decreasing trend (Chance 2006, Visual Revelations: Finding What Is Not There through the Unfortunate binning of Results: The Mendel Effect, pp. 49-52).  Also with a full dataset showing a moderate positive correlation it is possible to choose a subset that shows a negative correlation.  Given these, even if you have a legitimate reason for doing what you propose, you are giving any skeptics a lot of arguments to use against any conclusions that you come up with.
A: I have a hard time imagining a context in which this would be good practice, but lets assume for a moment that you indeed have a good reason for doing this. 
A brute force algorithm could be something like this:


*

*You calculate all possible sub-samples of n out of your overall sample of N. Most statistical packages have functions for calculating combinations without replacements that will do this for you.

*You estimate the correlation between x and y for each one of the sub-samples and select the maximum out of that set.
I just saw the original poster's comment regarding a reference for this procedure. I am not sure that someone has a specific name for this procedure after all you are simply generating an empirical distribution of all possible correlation in your dataset and selecting the maximum. Similar approaches are used when doing bootstraping, but in that case you are interested in the empirical variability, you DO NOT use them to pick a specific sub-sample associated with the max.
