Skip to content
Prev 359947 / 398503 Next

[FORGED] Generating random data with non-linear correlation between two variables

The goal is to test a developed model against two sets of hypothetical data, where the relationship between on data set is linear whereas non-linear (e.g., polynomial) with another. However, the distributions of the v1 and v2 should not be other than normal or slightly positively skewed or slightly negatively skewed. 

In Oracle, random data is generated with packaged function dbms_random.value(lowerbound, upperbound), which can be called from SQL query with where clause (level <= no_of_rows) for the number of rows you want.

After the rows are generated, we can write custom functions to spread the data points along the y-axis, so that they wouldn't overlap. 

I hope this may clear the use case further.

Many Thanks and 

Kind Regards
--
Muhammad Bilal


Research Assistant and Doctoral Researcher,
Bristol Enterprise, Research, and Innovation Centre (BERIC),
University of the West of England (UWE),
Frenchay Campus,
Bristol,
BS16 1QY 


muhammad2.bilal at live.uwe.ac.uk