Given series $A$ and a correlation, is it possible to randomly calculate a fitting series $B$?

With reference to the , my question is as follows.

Usually, one would enter two value-series and a script or program calculates the correlation. For instance, with $x = 5,3,6,7,4,2,9,5$ and $y = 4,3,4,8,3,2,10,5$, the correlation is $0.93439982209434$.

For an educational website, I'm trying to find a way to let students:

  • put in value series $x$, eg. $x = 5,3,6,7,4,2,9,5$
  • put in the correlation, eg. $0.9344$
  • put in upper and lower boundaries of $y$-series, eg. between $1$ and $10$
  • give back a random series which fits the citeria, eg. $y = 4,3,4,8,3,2,10,5$

The PHP script I have written to calculate the correlation can be found in the referred-to post on stackexchange. However, it was suggested mine was much more a mathematical than a programmatical question, hence this post. Would it be possible to execute this "reverse correlation"?

2022-07-25 20:45:08
Source Share
Answers: 0