Ben6993 wrote:I have just run Richard's version of Chantal's simulation (http://rpubs.com/gill1109/JCS2opt) which gives correlation coefficient = 0.9801 with individual detector angles chosen at 7.5 degree intervals, with one million pairs of data generated.
I have run the same program twice more with angle intervals of 3.75 and 1.875. The correlation in these two cases is still 0.9801. The same correlation is also found on two further runs with detector angle intervals of 15 and 30 degrees. So, reducing the angle interval is not increasing the correlation in Richard's R language version of Chantal's simulation. And the cosine curve is being imperfectly met in the regions near to 0 and 180 degrees.
Ben6993 wrote:I have just run Richard's version of Chantal's simulation (http://rpubs.com/gill1109/JCS2opt) which gives correlation coefficient = 0.9801 with individual detector angles chosen at 7.5 degree intervals, with one million pairs of data generated.
I have run the same program twice more with angle intervals of 3.75 and 1.875. The correlation in these two cases is still 0.9801. The same correlation is also found on two further runs with detector angle intervals of 15 and 30 degrees. So, reducing the angle interval is not increasing the correlation in Richard's R language version of Chantal's simulation. And the cosine curve is being imperfectly met in the regions near to 0 and 180 degrees.
spin = 1/2;
phase = 2 Pi spin;
spin2 = 2 spin;
trials = 1000000;
aliceDeg = 0;
bobDeg = 0;
aliceAngle = 0;
aliceDeg = 0;
bobAngle = Pi / 6;
bobDeg = 30;
nPP = 0;
nNN = 0;
nPN = 0;
nNP = 0;
nA = 0;
nB = 0;
test[angle_, e_, lambda_] := Module[{c, out},
c = Cos[1 (angle - e)];
If[lambda >= Abs[c], out = 0, out = Sign[c]]; out]
Do[
eVector = RandomReal[{0, 2 Pi}];
lambda = (1/2) Sin[RandomReal[{0, Pi / 2}]]^2;
eLeft = RandomReal[{0, 2 Pi}];
eRight = eLeft + 2 Pi spin;
aliceD = test[aliceAngle, eLeft, lambda];
bobD = test[bobAngle, eRight, lambda];
If[aliceD == 1, nA++];
If[bobD ==1, nB++];
If[aliceD ==1 && bobD == 1, nPP++];
If[aliceD == 1 && bobD == -1, nPN++];
If[aliceD == -1 && bobD == 1, nNP++];
If[aliceD == -1 && bobD == -1, nNN++],
{i, trials}];
corr = (nPP - nPN - nNP + nNN)/(nPP + nPN + nNP + nNN)
corr // N
-Cos[bobAngle] // N
In[96]:= (nPP - nPN - nNP + nNN)/(nPP + nPN + nNP + nNN) //N
Out[96]= -0.848954
In[97]:= - Cos[bobAngle] // N
Out[97]= -0.866025
(* Michel Fodje's Minkwe simulation
translated from Python to Mathematica by John Reed
13 Nov 2013 *)
(* Set run time parameters, initialize arrays *)
spin=1/2;
phase=2 \[Pi] spin;
spin2=2 spin;
trials=5000000;
aliceDeg=ConstantArray[0,trials];
bobDeg=ConstantArray[0,trials];
aliceDet=ConstantArray[0,trials];
bobDet=ConstantArray[0,trials];
nPP=ConstantArray[0,361];
nNN=ConstantArray[0,361];
nPN=ConstantArray[0,361];
nNP=ConstantArray[0,361];
nA=ConstantArray[0,361];
nB=ConstantArray[0,361];
(* Detector test function *)
test[angle_,e_,\[Lambda]_]:=Module[{c,out},
c=-Cos[1(angle-e)];
If[\[Lambda]>=Abs[c],out=0,out=Sign[c]];
out]
(* Generate particle data *)
Do[
eVector=RandomReal[{0,2 \[Pi]}];
\[Lambda]=1/2 Sin[RandomReal[{0,\[Pi](0.5)}]]^2;
eLeft=RandomReal[{0,2 \[Pi]}];
eRight=eLeft+2 \[Pi] spin;
aliceAngle=RandomReal[{0,2 \[Pi]}];
aliceDeg[[i]]=aliceAngle/Degree;
bobAngle=RandomReal[{0,2 \[Pi]}];
bobDeg[[i]]=bobAngle/Degree;
aliceDet[[i]]=test[aliceAngle,eLeft,\[Lambda]];
bobDet[[i]]=test[bobAngle,eRight,\[Lambda]],
{i,trials}]
(* statistical analysis of particle data *)
Do[
\[Theta]=Ceiling[(aliceDeg[[i]]-bobDeg[[i]])]-1;
aliceD=aliceDet[[i]];bobD=bobDet[[i]];
If[aliceD==1,nA[[\[Theta]]]++];
If[bobD==1,nB[[\[Theta]]]++];
If[aliceD==1&&bobD==1,nPP[[\[Theta]]]++];
If[aliceD==1&&bobD==-1,nPN[[\[Theta]]]++];
If[aliceD==-1&&bobD==1,nNP[[\[Theta]]]++];
If[aliceD==-1&&bobD==-1,nNN[[\[Theta]]]++],
{i,trials}]
(* Calculate mean values and plot *)
pPP=0; pPN=0; pNP=0;pNN=0;
mean=ConstantArray[0,361];
Do[
sum=nPP[[i]]+nPN[[i]]+nNP[[i]]+nNN[[i]];
If[sum==0,Goto[jump],
{pPP=nPP[[i]]/sum;
pNP=nNP[[i]]/sum;
pPN=nPN[[i]]/sum;
pNN=nNN[[i]]/sum;
mean[[i]]=pPP+pNN-pPN-pNP}];
Label[jump],
{i,361}]
simulation=ListPlot[mean]
(mean[[24]]+mean[[23]])/2//N
-0.900397
(mean[[68]]+mean[[69]])/2//N
-0.342987
cos=Plot[-Cos[x Degree],{x,0,360},PlotStyle->{Red,Thick}];
(* Compare mean values with Cosine *)
Show[simulation,cos]
FrediFizzx wrote:That doesn't mean anything.
FrediFizzx wrote:That doesn't mean anything.
Zen wrote:A few probabilistic comments about definition (A.9.1) in this document http://libertesphilosophica.info/blog/w ... 1/EPRB.pdf
Zen wrote:It is a good idea to say explicitly thathas a uniform distribution on the interval
. There are infinitely many distributions with this support.
Return to Sci.Physics.Foundations
Users browsing this forum: ahrefs [Bot] and 128 guests