Re: Re: bimodal ditribution form counting signs of Pi digits differences

*To*: mathgroup at smc.vnet.net*Subject*: [mg51744] Re: [mg51733] Re: bimodal ditribution form counting signs of Pi digits differences*From*: DrBob <drbob at bigfoot.com>*Date*: Sun, 31 Oct 2004 01:17:11 -0500 (EST)*References*: <clst68$3nf$1@smc.vnet.net> <200410300749.DAA01188@smc.vnet.net>*Reply-to*: drbob at bigfoot.com*Sender*: owner-wri-mathgroup at wolfram.com

> The Pi digits behave more like an "ideal" probablity > than the Mathematica random! WHICH ideal? Uniform? Normal? Cauchy? Binomial? Triangular? What? You're computing cumulative sums, so both series are heavily autocorrelated, which will cause pronounced peaks in a finite sample. The built-in Random[] function has a bit of serial autocorrelation, too. (Google RandomReplacement.) I think most of what you're seeing is because of Sum, however. When I compare plots for "brt4" and variates from Random[Integer,{0,9}], I get fairly similar pictures. Needs["Statistics`"] digits = 100000; h = Rest@# - Most@# &; span = Max@# - Min@# &; Timing[brt4 = Rest@FoldList[ Plus, 0, Sign@h@First@RealDigits[Pi, 10, digits]];] Timing[b = FoldList[Plus, 0, Sign@h@Table[Random[Integer, { 0, 9}], {n, 1, digits}]];] span /@ {brt4, b} ListPlot@brt4 ListPlot@Frequencies[brt4][[All, 1]] ListPlot[b, PlotJoined -> True]; ListPlot[Frequencies[b][[All, 1]]] You shouldn't fix the random number seed and look at one outcome; draw many samples and see if they ALL (or most of them) have whatever problem you think you've identified. If the span of brt4 were always less than that of b, for instance, you'd have a finding of some kind. >> Dr. Bob you always have an opinion, ha, ha... So do you, but it's always the same: "Ooh! Shiny!" It's an enviable enthusiasm, I suppose. Bobby On Sat, 30 Oct 2004 03:49:05 -0400 (EDT), Roger Bagula <tftn at earthlink.net> wrote: > > > Null hypothesis: the digits of Pi are random. > To check make up a random set of base 10 digits using Mathematica > using: > Random[Integer,{0,9}] > I picked a seed off the top of my head. > The result is a revolting development. > A trimodal distribution of noise pushed way positive. > The Pi digits behave more like an "ideal" probablity > than the Mathematica random! > Anybody see what I did wrong? > Dr. Bob you always have an opinion, ha, ha... > > (* random digit array base 10*) > SeedRandom[123] > a=Table[Random[Integer,{0,9}],{n,1,2000}]; > b=Table[Sum[Sign[a[[m+1]]-a[[m]]],{m,1,n}],{n,1,Dimensions[a][[1]]-1}]; > ListPlot[b,PlotJoined->True] > (* distribution of the noise that results*) > Max[b] > Min[b] > c=Table[Count[b,m],{m,Min[b]-1,Max[b]+1}] > ListPlot[c,PlotJoined->True] > > > Roger Bagula wrote: > >> This program is real slow on my machine. >> Show a lean toward positive differences that is "slight" at 2000 digits. >> >> Digits=2000 >> $MaxExtraPrecision = Digits >> (* Sum of the sign of the differences between the first 2000 digits of Pi*) >> f[m_]=Sum[Sign[Floor[Mod[10^(n+1)*Pi,10]]-Floor[Mod[10^n*Pi,10]]],{n,0,m}] >> a=Table[{n,f[n]},{n,0,Digits-1}]; >> ListPlot[a,PlotJoined->True] >> b=Table[a[[n]][[2]],{n,1,Dimensions[a][[1]]}]; >> (* distribution of the noise that results*) >> c=Table[Count[b,m],{m,-12,12}] >> ListPlot[c,PlotJoined->True] >> >> Respectfully, Roger L. Bagula >> tftn at earthlink.net, 11759Waterhill Road, Lakeside,Ca 92040-2905,tel: 619-5610814 : >> alternative email: rlbtftn at netscape.net >> URL : http://home.earthlink.net/~tftn >> >> >> > -- DrBob at bigfoot.com www.eclecticdreams.net

**References**:**Re: bimodal ditribution form counting signs of Pi digits differences***From:*Roger Bagula <tftn@earthlink.net>