# What is an example of a hidden variable model that meets the bound of Bell's inequality? The best possible local realist imitation (red) for the quantum correlation of two spins in the singlet state (blue), insisting on perfect anti-correlation at 0°, perfect correlation at 180°.

Just for my own understanding and learning of math, let's pretend that indeed the experimental data was the red curve rather than the blue curve. Then following the same article, we would be able to model this using a local realist model:

$$C_{h}(a,b)=E(A(\mathbf {a} ,\lambda )B(\mathbf {b} ,\lambda ))=\int _{\Lambda }A(\mathbf {a} ,\lambda )B(\mathbf {b} ,\lambda )p(\lambda )d\lambda .}$$

What choices of $$A(\mathbf {a} ,\lambda )$$, $$B(\mathbf {b} ,\lambda )$$, and $$p(\lambda )$$ would yield the red curve?

Assuming $$\mathbf {a}, \mathbf{b} \in \mathbb{R}^2$$, with $$\alpha, \beta$$ being the corresponding angles, the following model yields the red graph: $$\begin{array}{l} \lambda \sim{\rm{Uniform}}\left[ {0,2\pi } \right] \to \mathop P\left( \lambda \right) = \frac{1}{{2\pi }} \\ A(\mathbf {a} ,\lambda ) = {\mathop{\rm sgn}} \cos (\alpha - \lambda) \\ B(\mathbf {b} ,\lambda ) = -{\mathop{\rm sgn}} \cos (\beta - \lambda) \end{array}$$