To move the density in one way, you may square or square-root the random number. Math.random()*Math.random() will produce smaller integers (around 0) with a higher chance than larger ones (near 1).

Your formula could be something like this:

var position = Math.pow(Math.random(), gameSpeed / 3) * 400 + 200;

Or

Make an array with more lower values than higher ones, for example, to generate random integers between [1,5]. (both inclusive). As an example, your array could be [1,1,1,1,1,2,2,2,3,3,3,4,4,5].

And if you pick an element from that array at random, you'll have a better probability of picking a low number than a high one.

Ignite Your Future with Machine Learning Training!