tag:blogger.com,1999:blog-21503568.post3689306078861330200..comments2023-11-03T06:32:28.410-04:00Comments on Staring At Empty Pages: Patterns in randomness: the Bob Dylan editionBarry Leibahttp://www.blogger.com/profile/14205294935881991457noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-21503568.post-67602134196051620132011-12-21T16:50:10.564-05:002011-12-21T16:50:10.564-05:00Yes, Brent's right, my brain is pretty darned ...Yes, Brent's right, my brain is pretty darned random so I know it when I see it. :-) <br /><br />Seriously, I don't really see a better way to judge, given how hard it is to define randomness. I suppose one could write a program that said "the odds against getting this sequence randomly was X to 1."Nathaniel Borensteinhttps://www.blogger.com/profile/03232212556909107350noreply@blogger.comtag:blogger.com,1999:blog-21503568.post-87190511696223841652011-12-21T14:36:48.721-05:002011-12-21T14:36:48.721-05:00Actually, knowing Nathaniel, it would probably be ...Actually, knowing Nathaniel, it would probably be a good answer :-)Brenthttps://www.blogger.com/profile/13094923391435871078noreply@blogger.comtag:blogger.com,1999:blog-21503568.post-76834105934266453782011-12-21T11:39:37.241-05:002011-12-21T11:39:37.241-05:00@Nathaniel Borenstein: what are you using to judge...@Nathaniel Borenstein: what are you using to judge the "randomness" of the results your code is giving you? "My own brain," is probably not the best answer, given the discussion above.Call me Paulhttps://www.blogger.com/profile/17704646008578216859noreply@blogger.comtag:blogger.com,1999:blog-21503568.post-40400335653194162832011-12-21T11:28:39.436-05:002011-12-21T11:28:39.436-05:00See my update on this. The frequency of Bob Dylan ...See my <a href="http://staringatemptypages.blogspot.com/2011/12/highway-61-revisited.html" rel="nofollow">update on this</a>. The frequency of Bob Dylan was due to more than any error in randomness.Barry Leibahttps://www.blogger.com/profile/14205294935881991457noreply@blogger.comtag:blogger.com,1999:blog-21503568.post-56008764417226199182011-12-17T15:30:43.271-05:002011-12-17T15:30:43.271-05:00Reminds me of a favorite old game of math teachers...Reminds me of a favorite old game of math teachers, to predict that in a given classroom there will be at least two people with the same birthday. I no longer recall the proof, but apparently the critical number at which this is likely to work is 23 people (and, of course, most classes have more than 30 students nowadays, so the teacher's odds are excellent).Katharinehttps://www.blogger.com/profile/18053321832354040927noreply@blogger.comtag:blogger.com,1999:blog-21503568.post-72621669314223385162011-12-16T22:22:03.918-05:002011-12-16T22:22:03.918-05:00I've certainly tried using a timestamp as a se...I've certainly tried using a timestamp as a seed. I started with (csh syntax, sorry):<br /><br /> set seed=`date +%s`<br /><br />and when that didn't work tried further randomizing it with:<br /><br /> set seed=`expr $seed % $$`<br /><br />And I still get crappy randomness. And if you can get good randomness in a compiled language, how hard would it be to write a utility (like "jot") to make it available in a shell script?Nathaniel Borensteinhttps://www.blogger.com/profile/03232212556909107350noreply@blogger.comtag:blogger.com,1999:blog-21503568.post-6889496241314649252011-12-15T17:53:47.257-05:002011-12-15T17:53:47.257-05:00Mm, I don't know about shell scripts. I'm...Mm, I don't know about shell scripts. I'm thinking of Java, C, C++, FORTRAN, Pascal, and the like. I use Rexx for scripting (try <a href="http://www.oorexx.org/" rel="nofollow">ooRexx.org</a>), and that also has a decent one.<br /><br />I'm surprised that using something derived from a timestamp value for a seed doesn't give you adequate pseudo-randomness. Hm.Barry Leibahttps://www.blogger.com/profile/14205294935881991457noreply@blogger.comtag:blogger.com,1999:blog-21503568.post-25551506788722481642011-12-15T17:25:39.666-05:002011-12-15T17:25:39.666-05:00Barry -- You wrote "good code to generate pse...Barry -- You wrote "good code to generate pseudo-random numbers... is readily available." That certainly hasn't been my experience. I've been looking for a good random number generator for use in shell scripts for years. <br /><br />If you know of anything better for that purpose than "jot" for OS X, I'd love to hear about it. Even jumping through hoops to produce a highly variable seed, I see it produce the same results remarkably often.Nathaniel Borensteinhttps://www.blogger.com/profile/03232212556909107350noreply@blogger.comtag:blogger.com,1999:blog-21503568.post-21826007930557078192011-12-15T15:45:20.474-05:002011-12-15T15:45:20.474-05:00«I also suspect the algorithm used to select the s...<i>«I also suspect the algorithm used to select the songs isn't truly random.»</i><br /><br />I suspected that, too, and I'm still not sure. But the thing is, good code to generate pseudo-random numbers (technically, <em>none</em> of it is <em>truly</em> random, because it's done algorithmically) is readily available, and isn't rocket science anyway. Pretty much every software development kit has one, and they're all decent. You'd kind of have to go out of your way to do it badly.<br /><br />If what we're observing really is there (as opposed to just <em>appearing</em> to be there), it's more likely that it's intentional bias that's been added in, in a misguided attempt to try to make the music style shift less abruptly, or some such.Barry Leibahttps://www.blogger.com/profile/14205294935881991457noreply@blogger.comtag:blogger.com,1999:blog-21503568.post-33238820110414123652011-12-15T11:01:29.722-05:002011-12-15T11:01:29.722-05:00I notice similar strings of play when I listen to ...I notice similar strings of play when I listen to my iPod. It seems to favour a specific artist for a while, then later it will favour a different artist. I suspect confirmation bias and the pattern seeking nature of our brains play a big part. I also suspect the algorithm used to select the songs isn't truly random.Call me Paulhttps://www.blogger.com/profile/17704646008578216859noreply@blogger.com