Preliminary analysis of the video-taped tosses suggests that a coin will land the same way it started about 51 percent of the time. "It's a gem-like example of what we know that isn't so," Diaconis says. Though a skeptic since childhood, he believed that "if you flipped a coin vigorously, it was going to be fair.[source]
"But it's not so bad," he says. "One in a hundred is pretty close, actually. It gives me faith that probability assumptions can be validated and useful, but you have to look at them case by case."
getRandomNumber() (and I insist since no mention of sequences, or "new" numbers is made, the function meets it perfectly), consider this possible scenario:getRandomNumber(), which he also implemented in the interests of "modularity" (but, of course, is only ever called by that one function).getRandomNumber() returning a fixed, but randomly selected number. getRandomNumber(), go WTF???? and "fix" it.From Stack Overflow:
In an infinite sequence of random numbers, you will see infinite sequences of the same number. - Lasse V. Karlsen
Is there mathematical proof for this? – StackedCrooked
@StackedCrooked: It isn't true. But you would see arbitrarily long sequences of the same number. – Jason Orendorff Methinks Mr. Orendorff does not understand the peculiar qualities of infinity.« Older End of the decade flash fun: Picma Picture Enigmas... | The US Census has a blog - Rob... Newer »
This thread has been archived and is closed to new comments
1) A programmer, needing to write a function that returned a random number, rolled a die once and got the number four, which he hardcoded into the function.
2) A function that returns "4" repeatedly cannot easily be distinguished from a random number generator without repeated tests (as illustrated by the Dilbert comic).
Both the text accompanying the XKCD comic as well as the fact that interpretation (2) would make sense only if the source code of the function were hidden indicate that (1) was what Randall Munroe was going for, but (2) seems to be how many people interpret the comic, including many of the Stack Overflow respondents.
posted by null terminated at 5:48 AM on December 31, 2009 [7 favorites]