Note that there are some explanatory texts on larger screens.

plurals
  1. POBest way to generate a set of integers of size N, distributed like a normal distribution, given a mean and std. deviation
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COYou did specify the minimum and maximum values... when you said "Gaussian". You either need to specify what your goals are (what you need randomness for), instead of your approach (generating "gaussian" integers), or go back and study statistics so you understand why your question makes no sense. (Among other things, to generate integers, you need a discrete distribution, but gaussian is continuous).
      singulars
    2. COI somewhat see your point, but I still think it makes sense. What I want to do is to generate a set of integers that are distributed over a range, satisfying a given mean and std. dev. That is the most important part, but I would also like these integers to form a bell curve, although it cannot be strictly gaussian, I would like it to preserve this property as much as possible. Maybe rounding is actually just the way then?
      singulars
    3. COThen I suggest you compute a gaussian CDF across the range of integers you're interested in, stretch it slightly to account for the missing tails, and store it in an array. Then you generate uniform reals in the range [0:1], and use binary search to invert the CDF. This procedure for generating samples from an arbitrary CDF is pretty standard.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload