5 ms·
Random numbers need not be uniform
- jgrahamc 16y agoThe phrase "Random numbers need not be uniform" is a really bad title for this. Random numbers are by definition uniformly distributed. What you are referring to here is Benford's Law. Why not simply say that in the title?
- ajuc 16y agoThis is really a bad title, but random numbers indeed need not be uniformly distributed - for example Gauss distributed numbers aren't distributed uniformly (from definition:).
- jgrahamc 16y agoI don't understand in what sense numbers drawn from a Gaussian distribution would be considered random.
- SamReidHughes 16y agoI don't understand in what sense numbers drawn from a uniform distribution would be considered random.
- deleted 16y ago[deleted]
- Daniel_Newby 16y agoThe numbers' only relationship is to the distribution, not each other or some other process.
- ajuc 16y agoIf the random variable that we measure has Gaussian distribution - the numbers we read will have Gaussian distrubuition, and will be random. Other example - rolling dice with 5 sides signed "6" and one side signed "1" - results will be random, but the resulting distribution won't be uniform. Uniform distribution is special case of random distribution.
- jgrahamc 16y agoAh. Fair enough. That's a rather interesting case, and what I assume is not what people think of when you say random number. I assume that people think of a uniform distribution (i.e equally likely numbers).
- Rod 16y agoSpeak for yourself. Gaussian distributions are ubiquitous (thanks to the Central Limit Theorem), while uniform distributions only exist in the realm of pseudo-number generators and little else. I think that the point you're trying to make is that a random variable with a uniform distribution is more "random" than a random variable with a gaussian distribution. The metric you're implying is called entropy, as a uniform distribution is maximally entropic.
- omaranto 16y agoYou're probably right that people who haven't taken a course in probability are likely to use "random" to mean "uniformly at random". And of course, most people haven't taken a course in probability.
- mturmon 16y agoI would assert that people don't even know how to conceptualize the question in these terms ("random number" == "uniform distribution"). After you do study probability (by gambling, by lab work, by quantitative programming, or, least fun, in coursework), you get introduced to the "right questions to ask", like: "what's the distribution", "are the samples independent", "what are you conditioning upon" For instance, many people don't know that the distribution of the sum of two dice looks very different than just one die. They're both random, but not both uniform. Often people know something's weird, but can't formulate the question because they don't have the language.
- tome 16y agoDo you think the result of rolling two dice and adding them is random?
- deleted 16y ago[deleted]
- deleted 16y ago[deleted]
- fhars 16y agoOf course not. There are whole books on the subject: http://cg.scs.carleton.ca/~luc/rnbookindex.html http://cg.scs.carleton.ca/~luc/rnbookindex.html
- fhars 16y agoFor what it is worth: here is an example of a non-uniform random variate: a = [0,0,0,0,0,0,0,0,0,0] 1000.times do a[5 *(rand + rand)] += 1 end results in (actual numbers may vary randomly): irb(main):020:0> a => [28, 60, 96, 151, 171, 168, 146, 96, 63, 21]
- snippyhollow 16y agoI am disappointed, I thought you were about to link something stating that "it is not correct to always consider unknown random variables to be uniformly distributed" (take 1/X for instance of why this is wrong). Instead, Benford's law...
- jellicle 16y agoPeople are going to be confused by this, because the definition of "random" used by mathematicians and that used by programmers is different. "Random" to mathematicians means the outcome of a probability experiment. If you flip a two-headed coin or roll a one-sided die, and record the results, the results are "random" - random within the set of possible outcomes, according to the function that generates them. So you dutifully record "heads", "heads", "heads" and "1", "1", "1" for your results. It's random! "Random" for mathematicians inherently means "predictable". There's a known probability distribution. The word "random" for programmers means something very different. It inherently means "unpredictable". The probability distribution must be flat across the space of possible outcomes. If we are operating in a base-10 system, the chance of any of the next digits occurring must be exactly 1/10. My prediction is most of the discussion here will be people talking past each other, using different definitions of the word "random".
- ajuc 16y agoI'm programmer - for me random string is a string, that is shorter than any programm that generates it (random string has Kolmogorov complexity greater or equal its length). I think this is the definition for mathematicians as well. It's just that "random" is a common shortcut for - string comming out of probability experiment - it is very likely that it is random according to Kolmogorov complexity, because most strings are random, and space is very very big.
- omaranto 16y agoWhile I think that while most mathematicians are aware of Kolmogorov/Chaitin complexity theory, the first thing that comes to mind when they hear "random" is the theory of probability. In probability a random variable is, roughly speaking, an experiment that has a set of possible outcomes each occuring with a certain probability. The probabilities are not necessarily the same. I think most mathematicians would agree that Probability is a much larger and important branch of mathematics than Kolmogorov-Chaitin complexity, and usually use "random" in its probabilistic meaning.
- 16y ago
- p3ll0n 16y agoBenford's Law is a special case of Zipf's Law (http://en.wikipedia.org/wiki/Zipfs_law http://en.wikipedia.org/wiki/Zipfs_law) as they both originate from the same scale invariant functional relation from stat mech.
- pohl 16y agoSweet...a wikipedia page that reliably causes an "Aw, snap" in Chrome (5.0.375.70 on MacOS X). Is it just mine? (In case anybody is wondering whether I've done the right thing and reported the problem: yes, I have.)
- scott_s 16y agoStrange. Loads fine for me. Same version of Chrome on 10.5.8.