I have 100,000 random samples (with replacement) X_i from an otherwise unknown distribution.
I want to create a series Y_i that
- is the same as X_i except for the ordering and
- gives a correlation between X and Y of some given number (or a correlation close to that given number).
Is there a known technique/procedure/algorithm for this?
Y = [1, 2, 3, 4, 5, 28, 6, 2, 4]
seems to give a correlation less than $0.14$ whileY = [6, 5, 4, 3, 2, 1, 28, 4, 2]
seems to give a correlation greater than $0.93$ $\endgroup$