Zeta Zeros Spacing Tests

SetDirectory["D:/GEOMETRY/INFOGEOM/QuantumInformation"]
<<HypothesisTesting`
Needs["BarCharts`"]

First 100,000 Zeros

B=ReadList["ZetaZeros1.txt",Number];
Length[B]

Clear[SZ]
SZ=Table[(B[[k+1]]-B[[k]])/0.749074,{k,1,Length[B]-1}];

Example: Statistics of spacings of integer 1 :-{Mean,Var,CV,Gamma}

{Mean[SZ//Evaluate],Variance[SZ//Evaluate],(Sqrt[Variance[SZ//Evaluate]])/Mean[SZ//Evaluate],(((Mean[SZ//Evaluate])^2)/(Variance[SZ//Evaluate]))}//N

BinCounts[SZ,{0,7,0.1}]

70 Mean[BinCounts[SZ,{0,7,0.1}]]//N

zer=BarChart[BinCounts[SZ,{0,3,0.1}],GridLines->Automatic,Frame->True]

gam=ListPlot[100000Table[(∫_(k 0.1)^((k+1)0.1)) (((5.427^5.427) (E^(-x 5.427)) (x^4.427))/(  Gamma[5.427]))\[DifferentialD]x,{k,0,30}],PlotStyle->{RGBColor[0,0,0],AbsolutePointSize[9]},GridLines->Automatic,Frame->True];

Show[zer,gam]

Gamma parameter is expected to be 3 for GUE according to Berry, which zeta zeros is expected to follow according to Rudnick

Plot[{(((5.427^5.427) (E^(-x 5.427)) (x^4.427))/(Gamma[5.427])),(((3^3) (E^(-x 3)) (x^2))/(Gamma[3]))},{x,0,3}]

F[j_]:=Table[(B[[k+1]]-B[[k]])/0.749074,{k,1+10000(j-1),10000j-1}]

F[1]

Table[{Mean[F[j]],Variance[F[j]],(Sqrt[Variance[F[j]]])/Mean[F[j]],(((Mean[F[j]])^2)/(Variance[F[j]]))}//N ,{j,1,10}]//MatrixForm

Mehta Tabulation of GUE: Appendix A15

GUE={{0,0},{0.064`,0.01326},{0.127`,0.05221},{0.191`,0.11438},{0.255`,0.19592},{0.318`,0.29186},{0.382`,0.39649},{0.446`,0.50384},{0.509`,0.60804},{0.573`,0.70370},{0.637`,0.78628},{0.764`,0.89937},{0.891`,0.93351},{1.019`,0.89288},{1.146`,0.79483},{1.273`,0.66302},{1.401`,0.52079},{1.528`,0.38659},{1.655`,0.27194},{1.783`,0.18166},{1.91`,0.11543},{2.037`,0.06986},{2.165`,0.04032},{2.292`,0.02221},{2.419`,0.01168},{2.546`,0.00588},{2.674`,0.00283},{2.801`,0.00130},{2.928`,0.00057},{3.056`,0.00024}};
(∑_(j=1)^30)0.1054753  GUE[[j,2]]
(∑_(j=1)^30)0.1054753   GUE[[j,2]]GUE[[j,1]]/0.90683
(∑_(j=1)^30)0.1054753   GUE[[j,2]]((((GUE[[j,1]]/0.906831)-1))^2)
(Sqrt[(∑_(j=1)^30)0.1054753   GUE[[j,2]]((((GUE[[j,1]]/0.906831)-1))^2)])
1/(∑_(j=1)^30)0.1054753   GUE[[j,2]]((((GUE[[j,1]]/0.906831)-1))^2)

gueplot=ListPlot[ GUE,Frame->True,GridLines->Automatic,Joined->True,PlotStyle->{RGBColor[0,0,0],AbsoluteThickness[3]}];

Probability Distribution For Classwidth 0.1

(∑_(j=1)^30)0.1 GUE[[j,2]]/0.9480890

(∑_(j=1)^30)0.1 GUE[[j,2]]GUE[[j,1]]/(0.90683138502 0.9480890)

(∑_(j=1)^30)0.1 GUE[[j,2]](((GUE[[j,1]]-1))^2)/0.9480890

(Sqrt[%])

1/0.20231326802968919

Hence for true GUE mean 1 variance 0.202 cv 0.4498 kappa 4.943

GUEprob=Table[{GUE[[j,1]],0.1 GUE[[j,2]]},{j,1,30}];

gueplotprob=ListPlot[ GUEprob,Frame->True,GridLines->Automatic,PlotStyle->{RGBColor[0,0,0],AbsolutePointSize[7]}, PlotRange->{{-0.05,3.1},{-0.005,0.1}}]

First 2,001,052 Riemann zeta zeros

Frequency Distribution for First 2001052 Zeros

M=ReadList["ZetaZeros2million.txt",Number];
Length[M]

Example: Statistics of spacings of integer 1 :-{Mean,Var,CV,Gamma}

Clear[MZ]
MZ=Table[(M[[k+1]]-M[[k]])/0.56594,{k,1,Length[M]-1}];
{Mean[MZ//Evaluate],Variance[MZ//Evaluate],(Sqrt[Variance[MZ//Evaluate]])/Mean[MZ//Evaluate],(((Mean[MZ//Evaluate])^2)/(Variance[MZ//Evaluate]))}//N

BinCounts[MZ,{0,7,0.1}]//N;
zerm=BarChart[BinCounts[MZ,{0,3,0.1}],GridLines->Automatic,Frame->True];

Gamma parameter is expected to be 3 for GUE according to Berry, which zeta zeros is expected to follow according to Rudnick. Best fit GUE gamma has parameter 4.247

s1=Table[j/10,{j,1,30}]//N

gammgue=ListPlot[Table[ {s1[[k+1]], (∫_(k 0.1)^((k+1)0.1)) (((4.247^4.247) (E^(-x 4.247)) (x^3.247))/(  Gamma[4.247]))\[DifferentialD]x},{k,0,29}],PlotStyle->{RGBColor[0,0,0],AbsolutePointSize[4]},GridLines->Automatic,Frame->True,PlotRange->{{-0.05,3.1},{-0.005,0.1}}]

Show[gueplotprob,gammgue]

Probability Distribution for First 2001052 Zeros

Z1=BinCounts[MZ,{0,7,0.1}]/2001052//N

s1=Table[j/10,{j,1,30}]//N;

Z2=ListPlot[Table[{s1[[k]],Z1[[k]]},{k,1,30}],PlotStyle->{{RGBColor[.99,.7,0],AbsolutePointSize[12]},{AbsolutePointSize[5],RGBColor[.0,.0,.0]}},GridLines->Automatic,Frame->True, PlotRange->{{-0.05,3.1},{-0.005,0.101}}];

Show[Z2,gueplotprob,gammgue]

Effect of Location on CV

H[j_]:=Table[(M[[k+1]]-M[[k]])/0.56594,{k,1+200000(j-1),200000j-1}]

Table[{j,Mean[H[j]],Variance[H[j]],(Sqrt[Variance[H[j]]])/Mean[H[j]],(((Mean[H[j]])^2)/(Variance[H[j]]))}//N ,{j,1,10}]//MatrixForm

TeXForm[%]

Effect of Sample Size on CV

L[j_]:=Table[(M[[k+1]]-M[[k]])/0.56594,{k,1,200000j}]

Table[{j,Mean[L[j]],Variance[L[j]],(Sqrt[Variance[L[j]]])/Mean[L[j]],(((Mean[L[j]])^2)/(Variance[L[j]]))}//N ,{j,1,10}]//MatrixForm

TeXForm[Out[48]]