Here is the Mathematica code for an experiment in which Alice and Bob keep their settings fixed:
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
Here is the result:
In[96]:= (nPP - nPN - nNP + nNN)/(nPP + nPN + nNP + nNN) //N
Out[96]= -0.848954
In[97]:= - Cos[bobAngle] // N
Out[97]= -0.866025
See the difference?