TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

What does randomness look like?

474 点作者 cyrusradfar超过 12 年前

22 条评论

henrikschroder超过 12 年前
Back in the day I was in a raiding guild in World of Warcraft. And back then, each boss monster in a raid dungeon had a loot table, and when you killed it, your raid got a few pieces of random loot.<p>And I don't know how many times I, and the other guy in the guild who understood statistics, had to explain to the others that random doesn't mean uniform. If a certain piece of armour has a 1/X chance to drop from a boss, what people <i>think</i> should happen is that if they kill that boss X times, they should see it drop once.<p>But the reality was of course that loot was very non-uniform. Some pieces we saw lots of times, and other pieces very rarely, despite them having the same drop chance. And the players who wanted those pieces that happened to be rare for our guild, got very, very angry.<p>We saw the same things on the official message boards, players were <i>furious</i> after having spent a year killing the same raid boss once a week, and <i>never</i> seeing a certain piece drop for them. But simple math shows that with million of players, tens of thousands of raiding guilds, some of those will see very streaky results.<p>These days in World of Warcraft, boss monsters drop tokens instead, and when you have X tokens, you can exchange that for a piece of armour, or a weapon, guaranteed. And noone complains about the random loot anymore.
评论 #4955305 未加载
评论 #4955337 未加载
评论 #4956222 未加载
评论 #4955329 未加载
评论 #4955468 未加载
评论 #4955381 未加载
评论 #4956841 未加载
评论 #4958100 未加载
评论 #4955345 未加载
评论 #4955308 未加载
marvin超过 12 年前
Regarding the bomb plot at the very bottom. Examining the number of bombs dropped in each square and comparing it to the Poisson distribution, it appears that the distribution of the bombs is random.<p>But looking at the plot on the map, it appears that the higher incidence of bombs is focused on a specific region. The Poisson distribution doesn't account for the fact that a lot of the squares with a high incidence of bombs are adjacent to each other. From my layman's understanding, it appears that the bombs were in fact targeted on a specific area, but that there was a random offset from this area regarding where the bombs actually landed. Because of this, you'd see randomness in the distribution. But the distribution of bombs wasn't really perfectly random.<p>Is the author deliberately avoiding this point, or is there something I've misunderstood?
评论 #4955334 未加载
评论 #4955825 未加载
评论 #4955319 未加载
Xcelerate超过 12 年前
Here's a weird thing about randomness that has always bothered me:<p>In quantum mechanics, if you measure two incompatible observables (like position and momentum) of a system, and then repeat that experiment many times, you will get two lists of real numbers. QM says you can predict the distribution of these numbers, but you cannot predict the individual numbers themselves. The popular way of thinking nowadays is that "the universe is just inherently random".<p>So I posed the question on the Physics Stack Exchange: how do we know these numbers are truly random, and not the result of some as-yet-undiscovered pseudorandom number generator that is nonetheless deterministic? Luboš Motl (Czech string theorist) replied (a bit abrasively I might add) that yes, the numbers are truly random and plenty of experiments have ruled out the loopholes. Now, there's no way to determine if a set of numbers are truly random, so how he made this bold matter-of-fact statement is beyond me.<p>Einstein initially believed in "hidden variable" theories, undiscovered properties of quantum systems. Most of these have been ruled out by experiment (this is what Lubos mentioned), but really, this doesn't apply at all to my question of whether those numbers are random or not. Superdeterminism seems to still allow non-randomness, but for some reason, most physicists (notably excepting Gerard t'Hooft) have discounted superdeterminism as nonsense.
评论 #4956148 未加载
评论 #4956399 未加载
评论 #4956709 未加载
praptak超过 12 年前
You can try it out yourself in your browser. This scriptlet generates random and non-random dot distributions side by side (refreshing regenerates, at least in Firefox 17):<p>javascript:"&#60;html&#62;&#60;body&#62;&#60;canvas id=\"tutorial\" width=\"200\" height=\"200\"&#62;foo&#60;/canvas&#62;&#60;-&#62;&#60;canvas id=\"tutorial2\" width=\"200\" height=\"200\"&#62;foo&#60;/canvas&#62;&#60;script&#62;var canvas = document.getElementById('tutorial');var ctx = canvas.getContext('2d');ctx.fillStyle = \"rgb(000,0,0)\";for (var i=0;i&#60;400;i++) {ctx.fillRect (Math.random() * 200,Math.random() * 200, 2, 2); };&#60;/script&#62;&#60;script&#62;var canvas = document.getElementById('tutorial2');var ctx = canvas.getContext('2d');ctx.fillStyle = \"rgb(000,0,0)\";for (var i=0;i&#60;20;i++) for(var j=0;j&#60;20;j++) for(k=0;k&#60;1;k++) {ctx.fillRect (i * 10 + Math.random() * 10, j * 10 + Math.random() * 10, 2, 2); };&#60;/script&#62;&#60;/body&#62;&#60;/html&#62;"<p>(just paste the above into the address bar)
评论 #4956282 未加载
Uhhrrr超过 12 年前
"Gravity's Rainbow", by Thomas Pynchon, has an extended section about the Poisson distribution as applied to falling bombs, maternity wards, etc.:<p><a href="http://books.google.com/books?id=GGPm4I3BbxAC&#38;pg=PT194&#38;lpg=PT194&#38;dq=poisson+distribution+gravitys+rainbow&#38;source=bl&#38;ots=APsLuTKC1F&#38;sig=wUaE1csdIbr744iR-_ZvRVQ1sCo&#38;hl=en&#38;sa=X&#38;ei=KBfVULfTI8OFiAKT04CgDw&#38;ved=0CGIQ6AEwBQ" rel="nofollow">http://books.google.com/books?id=GGPm4I3BbxAC&#38;pg=PT194&#...</a><p>(possibly NSFW)
评论 #4955837 未加载
suby超过 12 年前
"The one on the left, with the clumps, strands, voids, and filaments is the array that was plotted at random, like stars."<p>Are stars really plotted at random?
评论 #4955185 未加载
评论 #4955367 未加载
评论 #4955431 未加载
thaumaturgy超过 12 年前
I would love to see more like this on HN.
评论 #4955155 未加载
tdyo超过 12 年前
This is exactly how they determine species distributions in ecology as well - <a href="http://en.wikipedia.org/wiki/Species_distribution" rel="nofollow">http://en.wikipedia.org/wiki/Species_distribution</a><p>Uniform dispersion would suggest some territoriality aspect of the species, and clumped dispersion would suggest a heterogeneity of resources (or any other hypothesis that could then be tested).
评论 #4955826 未加载
dgallagher超过 12 年前
Python script I wrote a while back that outputs random images. PIL must be installed to work. Change |file_name| accordingly. JPEG images can be up to 65535 x 65535 in size, which are the max values for |width| and |height|. It's not optimized, so keep the resolution small unless you want to wait a while.<p>It'll output images that look like this: <a href="http://dave-gallagher.net/pics/666x666.png" rel="nofollow">http://dave-gallagher.net/pics/666x666.png</a><p><pre><code> from PIL import Image, ImageDraw from random import randint def random_image(): width = 666 height = 666 file_name = '/Users/Dave/%dx%d' % (width, height) path_png = file_name + '.png' path_jpg = file_name + '.jpg' path_bmp = file_name + '.bmp' path_tif = file_name + '.tif' img = Image.new("RGB", (width, height), "#FFFFFF") draw = ImageDraw.Draw(img) for height_pixel in range(height): if height_pixel % 100 is 0: print height_pixel for width_pixel in range(width): r = randint(0, 255) g = randint(0, 255) b = randint(0, 255) dr = (randint(0, 255) - r) / 300.0 dg = (randint(0, 255) - g) / 300.0 db = (randint(0, 255) - b) / 300.0 r = r + dr g = g + dg b = b + db draw.line((width_pixel, height_pixel, width_pixel, height_pixel), fill=(int(r), int(g), int(b))) img.save(fp=path_png, format="PNG") img.save(fp=path_jpg, format="JPEG", quality=95, subsampling=0) # 100 quality is 2x to 3x file size, but you won't see a difference visually. img.save(fp=path_bmp, format="BMP") img.save(fp=path_tif, format="TIFF") if __name__ == "__main__": random_image()</code></pre>
y4m4超过 12 年前
Such a great article! - something nice at the HN top after a long time.
gluegeorge超过 12 年前
Were the bombs actually mostly random?
评论 #4955392 未加载
评论 #4955373 未加载
评论 #4956464 未加载
评论 #4955220 未加载
ChrisNorstrom超过 12 年前
True Randomness = If you roll a six sided die 60 times, each side will NOT get chosen 10 times. 1 side(s) will get chosen more than others, another side(s) might not get chosen at all.<p>So for all you entrepreneurs, if you fail, don't fall into a depression. Sure you worked just as hard as everyone else, maybe even harder. And yeah it's annoying to see others surpass you even though you've got everything they do. But that's life, you just got a bad batch of rolls.
laureny超过 12 年前
Here is an article on how to assess whether your data sample is "random enough": <a href="http://goo.gl/opl52" rel="nofollow">http://goo.gl/opl52</a>
pm90超过 12 年前
Very interesting! So, the basic point being made is that if you know that a set of events are random and independent and you know their mean value, then you can predict their spread? (or aggregation)<p>edit: Hmm...another question that comes to mind: is the converse true? If the spread of values of these events do not match the poisson distribution, then can we presume them to be nonrandom? Or nonindependent? Or both?
评论 #4955289 未加载
评论 #4956680 未加载
Avshalom超过 12 年前
As a side note this is one of those things that several tetris-clones deal have to deal with, long runs are probable but can frustrate a player so a lot of the times you want to to extra logic to keep it from being actually random.<p>A uniform "deck" a couple times larger than the number of pieces is the usual suggestion prevents large runs and makes sure that you see every piece more regularly.
评论 #4956716 未加载
jebblue超过 12 年前
I was happy that the first example with the dots looked like the second one was natural. My eyes felt better. With the student example my eyes struggled so I "reasoned" that the first one had more clumps and was wrong since the first dot example had more clumps and was wrong.<p>I guess I'm not a good randomness detective.
ashutosh2000超过 12 年前
This article is really interesting. It says that randomness doesn't mean uniformity but true randomness can have clusters. So what exactly is randomness? How can we define randomness? Is Math.random() is really random? Which is the best random function and how can we find if it is purely random?
Zenst超过 12 年前
True randomness is a system that say generates a 10 digit number and 11111111 has the same odd's as appearing as the other permutations. But then thats not strictly true as we all know any system that monitors the outcome (a good example will be fruit machines) to make sure there is a even distribution of all permutation will in essence remove that level of definition we like to think as truely random.<p>With that it gets hard to truely say what is random or what is a as yet unknown pattern. This is why many have taken the approach of not having a single source of random numbers but use many and average out from there. There again is that random as the chances with such an approach of getting a high or low value would be biased out.<p>So with that I postulate one mans random string is another mans non-random string. So with that I define randomness as a yet undertermind sequence or a data. So the included Dilbert post is with that extreemly clever and totaly true.
评论 #4955702 未加载
评论 #4956223 未加载
baddox超过 12 年前
I'm a bit confused. What is this notion of "pure randomness" that this article and many comments seem to be eluding to? Perhaps I'm just not using the same definitions of terms, but I thought a uniform distribution is still considered random.
评论 #4955652 未加载
评论 #4960957 未加载
评论 #4955677 未加载
tome超过 12 年前
Strange terminology. In mathematical parlance the arrangement of the glowworms is still described as "random", but the positions of the worms simply are not independent of one another.
评论 #4955773 未加载
michaelochurch超过 12 年前
One under-stated but awesome thing about Poisson distributions: fishing has a Poisson distribution. (Poisson is French for "fish".)
评论 #4956247 未加载
saosebastiao超过 12 年前
TL;DR <a href="http://www.google.com/finance" rel="nofollow">http://www.google.com/finance</a>