# Over-simplified Bell test experiment

Brian Greene describe an experiment in his book "The fabric of the cosmos" pretending to illustrate the Bell test experiment. I spent hours trying to understand it until I decided to write a small simulation to finally realize that the experiment is completely flawed !

After doing some browsing, I also realized that few people faced similar frustration so I decided to share my few lines of code (using python 3.x).
I won't try to describe the experiment itself, look at the code, I believe it will be clearer than any attempt to explain it using words.

The result is:
Code:
deterministic agreement=66.68952%
quantic agreement=66.668%

I didn't do the math but clearly the probability of agreeing is similar in the two experiences: 2/3. The book incorrectly claims that the probability should be smaller in the case of a "quantic treatment".

I have no doubt that the proper Bell test experiment works and indeed shows that there is "something linking the two entangled particles".
I just wish that the illustration given in the book was correct !

btw, if anybody fancy giving an updated version of the code which actually illustrate the Bell test experiment, that would be fantastic !

Code:
from random import *

# In this simplified experiemnt, a "particle" is describe by three bits, for instance: "001"
# In classical physics, three question can be asked to a particle: in the case of "001", the answer to the first
# and second question will be "0" and the answer to the third question will be "1"

# number of simulation
nbTest=10000000

# deterministic explanation of the experiment
nbSame=0
for particleId in range(0,nbTest):
# mulder and scully ask random question to the particle
mulder_question=randint(0,2)
scully_question=randint(0,2)
# classical version: the state is pre-determined
particle_state=[randint(0,1),randint(0,1),randint(0,1)]
mulder_observation=particle_state[mulder_question]
scully_observation=particle_state[scully_question]
# do they agree ?
if mulder_observation==scully_observation:
nbSame+=1
print("deterministic agreement={}%".format(100*nbSame/nbTest))

# quantic explanation of the experiment
nbSame=0
for particleId in range(0,nbTest):
# mulder and scully ask random question to the particle
mulder_question=randint(0,2)
scully_question=randint(0,2)
# the particle state is the same if "the question asked to the particle" is the same
if mulder_question==scully_question:
same_observation=randint(0,1)
mulder_observation=same_observation
scully_observation=same_observation
# otherwise, the particle state is random
else:
mulder_observation=randint(0,1)
scully_observation=randint(0,1)
# do they agree ?
if mulder_observation==scully_observation:
nbSame+=1
print("quantic agreement={}%".format(100*nbSame/nbTest))

K^2
As described in your code, they have to be exactly 2/3 as N->∞ in both cases. It would help a lot if you can cite the experiment description from the book. I see no connection with Bell's Theorem here. So either the book is really, really wrong, or you missed something in the explanation.

JesseM
I didn't do the math but clearly the probability of agreeing is similar in the two experiences: 2/3. The book incorrectly claims that the probability should be smaller in the case of a "quantic treatment".
Why do you think the book's claim is incorrect? Your simulation is of a local hidden variables theory where there are predetermined results for each of the three angles, and such a theory should indeed get disagreement of 1/3 or more when the experimenters pick different angles. The point is that the QM prediction can (depending on the three possible detector angles) predict a probability of disagreement that's less than 1/3, which shows that local hidden variables theories are incompatible with QM. Your simulation doesn't model QM at all since it doesn't involve using the wavefunction of the entangled particles to calculate probabilities...when you do this you find that if the two polarizers are set to angles A and B, the probability of getting opposite results is given by the equation cos2(A - B), so for example if each experimenter is randomly choosing between the angles 0, 60, and 120, then on trials where they happen to pick different angles the probability of getting opposite results is cos2(±60) = cos2(±120) = 0.25.

As described in your code, they have to be exactly 2/3 as N->∞ in both cases. It would help a lot if you can cite the experiment description from the book. I see no connection with Bell's Theorem here. So either the book is really, really wrong, or you missed something in the explanation.

Here is a summary of the experiment described in the book.

Mulder and Scully are on vacation in separate places. Both receive a mysterious package containing hundreds of "small titanium cubes". The cubes can be opened three ways: top/right/front. Inside the cube is a sphere which glows red or blue at random. It will glow a different color depending on what door is opened first.

Mulder calls Scully and claims that the packages have been sent by aliens. The aliens have a mysterious tech that works like this: If Mulder opens, say, the front, and it glows red, then the device will communicate a signal to Scully's Cube making it glow red if she opens up the front as well. If she opens up the right or top, the sphere will flash at random. Scully thinks this is dumb. The boxes were simply programmed from the outset to flash the same colors if the same doors are opened. Since there is no way to test for either hypothesis--the flashing is disabled if the boxes are tampered with--it's undecidable.

Mulder puzzles on this for a while, then comes up with an idea. They will open up the boxes in order (they are labled) but open the doors at random. Doing so, they will count how many times the sphere will glow with the same color.

The author claims that doing so will provide a test to decide whether there's a mysterious link between the boxes or not. In the book, Mulder says:
if you and I separately and randomly choose which door to open
on a given box and record the color we see flash, then, after doing this for
many boxes we must find that we saw the same color flash more than 50
percent of the time. But if that isn't the case, if we find that we don't agree
on the color for more than 50 percent of the boxes, then you can't be
right.

Note that the number 50% is due to the fact that the author only considers boxes with different colors. As in the code given in the OP, without this assumption, the fraction becomes 2/3. The author writes:
the only programs that are really different are those in which all
three colors are the same—red, red, red and blue, blue, blue. But for boxes
with either of these programs, we'll get the same color to flash regardless
of which doors we happen to open, and so the overall fraction on which
we should agree will only increase.

Why do you think the book's claim is incorrect? Your simulation is of a local hidden variables theory where there are predetermined results for each of the three angles.

There are two simulations in the code given. The first one is indeed predetermined, the second one is not (and is suppose to mimic a quantic behavior).

when you do this you find that if the two polarizers are set to angles A and B, the probability of getting opposite results is given by the equation cos2(A - B), so for example if each experimenter is randomly choosing between the angles 0, 60, and 120, then on trials where they happen to pick different angles the probability of getting opposite results is cos2(±60) = cos2(±120) = 0.25.

Could you relate those scientific facts to the illustration given ? In other words, what need to be changed in the simulation so that it gives a proper illustration of entanglement ? I can see you are now talking about "angles", maybe the measure needs to be done using "intermediate axis" (not just picking one single coordinate as the experience describes) ?

Last edited:
K^2
Ok. That description does sound a lot like a variation on Bell's Theorem. Let me think about it and look through your code again.

Edit: Alright. The author of the book messed up. This particular experiment does not let you distinguish between hidden parameter and quantum entanglement.

Suppose the boxes are pre-programmed. (Hidden parameter.) Since the identical sides have to be programmed the same way, you only get to randomly choose programming for one box. There are 8 ways 2 states can be distributed between 3 sides. Of these, 2 ways have same color on all sides, guaranteeing coincidence when measured. The other 6 ways are 2 of one color and 1 of the other. Let us consider these.

Suppose Mulder first opens a box and sees a color that's repeated on another side. The odds of that happening are 2/3. This gives Scully 2/3 odds of opening the side with the same color. If he opens side that's unique, it's 1/3 and 1/3. So the odds of coincidence are 4/9 + 1/9 = 5/9.

Putting it all together. You have 1/4 states that guarantee coincidence and 3/4 states that give you 5/9 odds of coincidence. Total is 3/12 + 5/12 = 8/12 = 2/3.

Now, let us consider quantum entanglement. Here, things are fairly trivial. If the same side is picked, the coincidence is guaranteed. If the different sides are picked, the outcome is independent 50/50 tossup. Odds of picking the same side are 1/3. You get 1/3 + 1/3 = 2/3.

The coincidence fraction is exactly 2/3 in both cases.

Last edited:
The author of the book messed up. This particular experiment does not let you distinguish between hidden parameter and quantum entanglement.

What's missing then ? I am sure there is a way to turn this experiment into something meaningful but I cannot work it out...

Any suggestion which would help me going one step further ?

K^2
Without being able to "rotate" states, I've got nothing. I was thinking about trying specifically to open different sides, but overall, you still get 1/2 in both cases.

JesseM
Ok. That description does sound a lot like a variation on Bell's Theorem. Let me think about it and look through your code again.

Edit: Alright. The author of the book messed up. This particular experiment does not let you distinguish between hidden parameter and quantum entanglement.

Suppose the boxes are pre-programmed. (Hidden parameter.) Since the identical sides have to be programmed the same way, you only get to randomly choose programming for one box. There are 8 ways 2 states can be distributed between 3 sides. Of these, 2 ways have same color on all sides, guaranteeing coincidence when measured. The other 6 ways are 2 of one color and 1 of the other. Let us consider these.

Suppose Mulder first opens a box and sees a color that's repeated on another side. The odds of that happening are 2/3. This gives Scully 2/3 odds of opening the side with the same color. If he opens side that's unique, it's 1/3 and 1/3. So the odds of coincidence are 4/9 + 1/9 = 5/9.

Putting it all together. You have 1/4 states that guarantee coincidence and 3/4 states that give you 5/9 odds of coincidence. Total is 3/12 + 5/12 = 8/12 = 2/3.
The author understood that the probability with 2 doors having one predetermined color and 1 having the opposite was 5/9, purpledog just didn't describe the author's argument very clearly. What the author actually says (on p. 109) is that if the boxes have predetermined colors for each door, and Mulder and Scully select doors randomly, the probability of them seeing the color must be greater than 50%, not exactly 50%. Here, I'll copy out the relevant part of the argument on p. 109-110:

"Well," Mulder continues, "here's an example. Assume you're right, and each sphere operates according to a program. Just to be concrete, imagine the program for the sphere in a particular box happens to be blue, blue, red. Now since we both choose from among three doors, there are a total of nine possible door combinations that we might select to open for this box. For example, I might choose the top door on my box while you might choose the side door on your box; or I might choose the front door and you might choose the top door; and so on."

"Yes, of course," Scully jumps in. "If we call the top door 1, the side door 2, and the front door 3, then the nine possible combinations are just (1,1), (1,2), (1,3), (2,1), (2,2), (2,3), (3,1), (3,2), (3,3)."

"Yes, that's right," Mulder continues. "Now here is the point: Of these nine possibilities notice that five door combinations--(1,1), (2,2), (3,3), (1,2), (,1)--will result in us seeing the spheres in our boxes flash the same color ... Now, since 5 is more than half of 9, this means that for more than half--more than 50 percent--of the possible combinations of doors that we might select to open, the spheres will flash the same color."

"But wait," Scully protests. "That's just one example of a particular program: blue, blue, red. In my explanation, I proposed that differently numbered boxes can and generally will have different programs."

"Actually, that doesn't matter. The conclusion holds for all possible programs. You see, my reasoning with the blue, blue, red program only relied on the fact that two of the colors in the program are the same, and so an identical conclusion follows for any program: red, red, blue, or red, blue, red, and so on. Any program has to have at least two colors the same; the only programs that are really different are those in which all three colors are the same--red, red, red and blue, blue, blue. But for boxes with either of those programs, we'll get the same color to flash regardless of which doors we happen to open, and so the overall fraction on which we should agree will only increase. So, if your explanation is right and the boxes operate according to programs--even with programs that vary from one numbered box to another--we must agree on the color we see more than 50 percent of the time."
Now, let us consider quantum entanglement. Here, things are fairly trivial. If the same side is picked, the coincidence is guaranteed. If the different sides are picked, the outcome is independent 50/50 tossup. Odds of picking the same side are 1/3. You get 1/3 + 1/3 = 2/3.

The coincidence fraction is exactly 2/3 in both cases.
But that's not how quantum entanglement works! Opening different sides of the boxes is supposed to be analogous to quantum experiments the detectors can be set to different angles (like different polarizer angles for entangled photons, or different angles of a Stern-Gerlach device for entangled electrons) and the particle can give one of two binary results at the detector (like either passing through or being deflected by the polarizer, or being deflected in a spin-up or spin-down direction at the Stern-Gerlach device). In one version of the Bell test, the experimenters agree to pick randomly between one of three agreed-upon detector angles on each trial. In this case, the probability of getting the same results when they pick different detector angles is not 50/50, instead it depends on the choice of angles--as I said before, for entangled particles that always give the same result when they encounter detectors at the same angle, the probability of giving the same result when they encounter detectors at two different angles A and B would be cos2(A-B). So if you pick the three angles 0, 60, and 120 as I suggested, then whenever the experimenters pick different angles (analogous to opening different sides of the box) the probability of getting the same result is not 50% but rather 25%.

If you look at Greene's original description of the Mulder/Scully experiment on p. 81 of the book (which can be viewed on google books here), he never says that there's a 50/50 chance of getting the same result when they pick different sides of the box to open, he just says that the decision of which color to flash is made "randomly", which I interpret to just mean stochastic, not predetermined. Nothing in Greene's description rules out the idea that when Mulder and Scully pick different sides to open, the "random" choice of which color to flash is still influenced by the "mysterious connection" he describes on the same page, in such a way that the colors they both see are not statistically independent.

Last edited:
JesseM
Could you relate those scientific facts to the illustration given ? In other words, what need to be changed in the simulation so that it gives a proper illustration of entanglement ? I can see you are now talking about "angles", maybe the measure needs to be done using "intermediate axis" (not just picking one single coordinate as the experience describes) ?
See my last comments to K^2. The angles are three different possible detector angles the experimenters have agreed to select randomly between in a typical type of Bell experiment, and for each angle the particle is going to give one of two binary results, analogous to Mulder and Scully picking between three possible sides of the box and always seeing one of two binary colors. If you want to make the simulation reflect an entanglement experiment where the three detector angles are 0, 60 and 120 as I suggested, then you should change it so that when Mulder and Scully pick different sides to open, the probability of them both seeing the same color is 25%.

If you look at Greene's original description of the Mulder/Scully experiment on p. 81 of the book (which can be viewed on google books here), he never says that there's a 50/50 chance of getting the same result when they pick different sides of the box to open, he just says that the decision of which color to flash is made "randomly", which I interpret to just mean stochastic, not predetermined.

If you are suggesting that a casual reader should naturally interpret "randomly" as being "25%", then it comforts me in thinking that this illustration is flawed. Note that I would not mind so much if the author didn't add:
Yet, remarkably, after a little thought, Mulder realizes that there is an
experiment that will settle the question completely. Mulder's reasoning is
straightforward, but it does require a touch more explicit mathematical
reasoning than most things we cover. It's definitely worth trying to follow
the details—there aren't that many—but don't worry if some of it slips by;
we'll shortly summarize the key conclusion.

I can imagine how an experienced quantum physicist might get the right idea out of it if he previously knew about the real experiment. But for a newbie like me, this is simply confusing and definitely not helping.

Sorry to be so "square" about this but I hope that by making the issue extra clear, this thread will spare some frustration for future readers. And let's be fair as well, so far, apart this glitch, I am really enjoying the book.

See my last comments to K^2. The angles are three different possible detector angles the experimenters have agreed to select randomly between in a typical type of Bell experiment, and for each angle the particle is going to give one of two binary results, analogous to Mulder and Scully picking between three possible sides of the box and always seeing one of two binary colors. If you want to make the simulation reflect an entanglement experiment where the three detector angles are 0, 60 and 120 as I suggested, then you should change it so that when Mulder and Scully pick different sides to open, the probability of them both seeing the same color is 25%.

I will think about a way to integrate this suggestion into the simulation. Off course I could simply enforce a 25% agreement if different doors are opened but it seems to easy, like cheating almost. The measures should speak for themselves.

Maybe this is time for me to understand the real experiment and try to "re-project" it into this illustration (if possible...).

JesseM
If you are suggesting that a casual reader should naturally interpret "randomly" as being "25%", then it comforts me in thinking that this illustration is flawed.
No, I'm not suggesting that, I'm saying it's natural to interpret it as "non-deterministic", with the precise probability not specified.
purpledog said:
Note that I would not mind so much if the author didn't add:
Yet, remarkably, after a little thought, Mulder realizes that there is an
experiment that will settle the question completely. Mulder's reasoning is
straightforward, but it does require a touch more explicit mathematical
reasoning than most things we cover. It's definitely worth trying to follow
the details—there aren't that many—but don't worry if some of it slips by;
we'll shortly summarize the key conclusion.
But the "reasoning" he presents is solely about showing that the probability must be greater than 50% in Scully's scenario where each box has a program giving a predetermined answer for each door, it has nothing to do with deriving the details of what would be predicted by QM. The argument is just that it must be more than 50% if Scully's scenario is true, but when we actually run the experiment it's less than 50% (for unknown reasons which he doesn't attempt to explain, or give a model for), therefore we have experimental proof that Scully's local-hidden-variables explanation was wrong. That's all.

Greetings all,

I'm new here -- found this forum by googling for information about "Brian Greene Mulder Scully illustration".

I was fascinated by Greene's illustration when I first read it, and being a software engineer by profession, I immediately set to writing a program to demonstrate it. To my dismay, however, I could not get my program to show any appreciable difference in the outcome based on whether the cubes were pre-hardwired, or worked as described in Greene's illustration.

However, I was thinking about it today, and decided to write another program. This time I think I was able to prove that there is a measurable difference, but I'm not sure if what my data means.

Here's what my program does: It performs the experiment outlined in the book with 1000 cubes, first using hard-wired cubes (pre-set to show pre-determined colors behind the doors), then using cubes that work like Greene describes (the first time a door is opened on a cube, it's colors are chosen at random, and the resulting set of colors is passed to the its corresponding cube in the other set, so that it will show the same colors).

The program then goes on to perform this same test (1000 cubes) 10,000 times. For each test, it stores in a file the percentage color agreement, and the percentage color agreement with one-color cubes (that show the same color for all doors) filtered out. (So, for example, a value of "50" for "Percentage Agreement" on a line means for that set of 1000 cubes, Scully and Mulder saw the same color cube-for-cube 50% of the time.)

Then, I take that file into Excel and graph some stuff. Initially, I graphed the data straight up, and it was as I suspected. The attached image ("raw data.png") shows the "Percent Agreement" graphed across the 10,000 tests. Blue is the hard-wired cubes, and red is the "entangled" cubes. The black line in the center is the trendline Excel shows for both lines. The graph is predominantly red only because Excel graphs the red line on top of the blue line.

Then, I took a different tack. For each line, I calculate the average percentage agreement up to that point, and then graphed this "cumulative average" for both the hard-wired, and "entangled" tests. The result is shown in the attached file ("cumulative average.png"). In that file, you can clearly see that there IS a difference between the outcomes based on whether the cubes are hard-wired or behave in the "entangled" fashion. The difference it tiny -- amounting to no more than about 0.1% over the 10,000 tests. However, regardless of scale, can it really be denied, looking at that graph, that there is a real difference in outcomes between the two tests?

If anyone would like to see my source code (in C#) I'd be happy to provide it.

-Tim

#### Attachments

• raw data.png
75.1 KB · Views: 432
• cumulative average.png
19.5 KB · Views: 432
Hmmm.... I don't see my file attachments... where'd they go? I uploaded them...

Ok, I edited the comment, and now the attachments are appearing.

DrChinese
Gold Member
A proper simulation of a Bell test will yield distinct differences between the classical and the quantum mechanical results. It won't be hard to see. It always helps to have a good understanding of the Bell approach first. If it helps, check out one of my pages on Bell:

http://drchinese.com/David/Bell_Theorem_Easy_Math.htm

Thank you for the response.

My goal was merely to demonstrate the illustration that Greene provided, exactly as he described it.

I read the article you linked. Very nice, and easy to understand!

Can you explain to me what it is about the boxes-with-doors illustration that Greene described that makes it difficult to see the difference? Or is there really no difference, and the slight difference that seems to appear in my graph is just an artifact of my program?

Or, maybe the better question would be, how could Greene's illustration be improved, to better show what it's trying to show (while still retaining its basic attributes -- i.e. Mulder and Scully, cubes with doors, lights, etc.)?

-Tim