Hi.
Bell's formulation of local realism is $$P(a,b)=\int\ d\lambda\cdot\rho(\lambda)p_A(a,\lambda)p_B(b,\lambda)\enspace.$$
Let's for simplicity assume there's only a finite number of states, so this becomes $$P(a,b)=\sum_{i} p_i\cdot\ p_A(a,i)p_B(b,i)\enspace.$$
I'm trying to translate this...