This Demonstration shows two experimental situations that exhibit apparent counterexamples to Bell's theorem. Experiment 1 shows that not counting the "no detection" in the case of both detectors can lead to correlation values of angles in the experiment that are the same as those predicted by quantum mechanics but different from the classical result. Experiment 2 shows that these differences exhibit a violation of Bell's inequality. The green line shows the values predicted by the CHSH formula and quantum mechanics. The red lines show the values above which or below which the inequality is violated. The blue line shows the simulated values.
In both graphs, the "count zeros" checkbox is to indicate the fact there is no way to count the occurrences when the photon does not pass through either filter, so no detector is triggered. If this happens, the Demonstration shows what would have happened if the zeros were counted. Also, increasing the number of repetitions will smooth the curve. However, the time goes up linearly with the number of repetitions (10,000 repetitions will take 100 times longer than 100 repetitions).
The first graph is the same as the graph in [1, Figure 3] except that it is simulating the polarization of entangled photons, which are always 90 degrees out of phase.
The second graph is produced by the Clauser–Horne–Shimony–Holt (CHSH) inequality [1, equations 20 and 21]. The CHSH inequality is a generalized Bell's inequality. The graph produced is a variant of the graph in [1, Figure 5], which plots the equation from 0 to 180 degrees. Again, the graph is phase shifted by 90 degrees.
The results of experiment 2 with the "count zeros" checkbox off shows two areas of below that are violating the inequality. Thus, the photons are entangled, which directly contradicts the fact that the photons are not entangled in the Demonstration.