I have two distributions $A$ and $B$ that are i.i.d.
I want to create two distributions $A'$ and $B'$, that have the "same distribution" as $A$ and $B$ (meaning the same probability distribution function), but are correlated (pearson correlation) with correlation $\rho$.
My first approach was to set $A' = B' = (A+B)/2$, but this works only for perfect correlation (or $\rho = -1$). Furthermore the distribution of $A'$ is not neccessarily equal to the distribution of $A$.
If the general case is to complicated, the problem I work on actually only requires $A$ to be uniform and not any given distribution.