MATLAB: Random numbers -1 +1 with 2 decimals without any distribution
random
Dear all, How can I generate random numbers ranging between -1 to +1 with 2 decimals and without any kind of distribution? Thanks in advance, Diego
Best Answer
With difficulty.
The -1 to +1 with 2 decimal places is not a problem (to the extent that binary floating point allows representation of 2 decimal places).
The "without any kind of distribution" is a problem. Practically everything hassome kind of distribution, even if it is only Uniform Random Distribution. You will get a (researched) distribution if you were to monitor keystroke reaction times; you would get a different distribution (which wouldnot be Uniform Random) if you asked people to enter numbers from 1 to 200.
You can get "cryptographically secure" pseudo-random generators, but those are designed to imitate Uniform Random Distribution.
You have 201 different outcomes, which is divisible by 3 (and not a prime), which interferes with using approaches such as ring theory. Besides, those approaches are for Uniform Random distribution.
If you have an upper bound on the numbers to be generated, then you arenot working with a gamma distribution. By definition, gamma distributions are infinite distributions on the upper end. They are normally 0 on the lower bound, but one could add a constant to the distribution.
If you have upper and lower bounds, you could consider using a beta distribution.
Best Answer