Javascript: Generate random numbers with fixed mean and standard deviation
问题 My question: How can I create a list of random numbers with a given mean and standard deviation (sd) in Javascript? Example: I want to create a list with 5 random numbers in a range between 1 to 10. The resulting mean should be 5 and the standard deviation should be 2. What I've done so far: My idea was (http://jsfiddle.net/QASDG/3/): Make a function (named "createData") which creates 5 random numbers between 1 and 10 and push them into an "array" This function should also calculate the mean