This tag is for questions pertaining to random numbers, whether pseudo random or truly random.
Since different languages may use different RNGs, a question with this tag must also be tagged with the language being used.
All questions pertaining to create random numbers or random distributions: good or bad random number generators (RNGs), how to create specific distributions (gaussian, log-normal) with given parameters from normal random numbers, problems and caveats with given implementations in different languages.
Since different languages may use different RNGs, a question with this tag must also be tagged with the language being used.
Frequently-asked questions
- How can I generate N uniformly-distributed random real numbers that sum to a given value?
- Language-agnostic
- Python
- Matlab
- PHP
- Javascript
- If uniformity is important, beware of this popular algorithm (its output is not uniform.)
- How can I choose N elements, avoiding duplicates, from a list (or from the integer range 1..M)?
- If I create a new random number generator object for each request, why does it return the same value repeatedly? (Or: only seed the random generator once)
- How do I generate a random integer value within a range?