I have difficulty to understand how Bell's inequality rules out local hidden variable theory. It seems to me that there is some hidden variable in the Kolmogorov's axiomatization of probability theory, where quantum mechanic is based, so what's the point?
To be precise, first let's state Bell's (or called CHSH) inequality in mathematical terms:
Suppose $X,Y,X',Y'$ are random variables which are almost surely bounded by $1$. Then we have $\mathbb E\lvert XY+XY'+X'Y-X'Y'\rvert\le2$.
It easily follows from the fact that $\lvert XY+XY'+X'Y-X'Y'\rvert\le2$ a.s.
Now let's focus on spin measurement, which contradicts Bell's inequality, and where Hilbert spaces are finite dimensional therefore we needn't care about infinitude issues.
Let $H=\mathbb Ce_1\oplus\mathbb Ce_2$ be the state space of spin 1/2, and $H\otimes H$ to be the state space of the spin measurement. We prepare for the initial state $\psi=(e_1\otimes e_2-e_2\otimes e_1)/\sqrt2$. As computed in wiki page, there is a specific choice of $a,b,a',b'\in S^2$ (for example, $a=(1,0,0),a'=(0,1,0),b=(1/\sqrt2,-1/\sqrt2,0),b'=(1/\sqrt2,1/\sqrt2,0)$) such that $S(a,b,a',b'):=\sigma(a,b)+\sigma(a,b')+\sigma(a',b)-\sigma(a',b')=-2\sqrt2$, hence the measurement results of spins cannot be described as random variables of a probability space. On the other hand, the measurement results should be random variables by the formulation of quantum mechanics. I don't understand what's really involved here.
I call for a mathematical explanation for this. Any help is welcome. Thanks!
EXPLANATIONS:
It seems to me that I need to elaborate the description for spin measurements. First, $H=\mathbb Ce_1\oplus\mathbb Ce_2$ is a Hilbert space with Hermitian product $\langle x_1e_1+x_2e_2,y_1e_1+y_2e_2\rangle=\overline{x_1}y_1+\overline{x_2}y_2$. Pauli matrices $S_x=\begin{bmatrix}0&1\\1&0\end{bmatrix},S_y=\begin{bmatrix}0&-i\\i&0\end{bmatrix},S_z=\begin{bmatrix}1&0\\0&-1\end{bmatrix}$ (which correspond to spins around $x,y,z$-axes) acts on this space, and set $S_u=xS_x+yS_y+zS_z$ for $u=(x,y,z)\in S^2$. It seems to me that the measurement results are associated with random variables. For example, the measurement result of the spin around $u$ is measured by the observable $S_u\otimes1$, and the correlation $\sigma(u,v)$ with expectation of the random variable correspondent to $S_u\otimes S_v$. The state vector is $\psi=(e_1\otimes e_2-e_2\otimes e_1)/\sqrt2$ (normalized), therefore $\sigma(u,v)=\langle\psi,(S_u\otimes S_v)\psi\rangle$. (I didn't take advantage of Dirac's notation)
In the Kolmogorov formalism, you could call the entire sample space a "hidden variable", since it is usually not observed directly but only through actual random variables. The reason it doesn't conflict with Bell's inequality is that is is not local -- on the contrary it is the most global hidden variable conceivable, governing both which measurement the observers at each end of the experiment decide to make, and how the two entangled particles react to those measurements.
My understanding (which is filtered through several popular works, so caveat lector) is that the kind of "hidden variable theory" that Bell's theorem rules out is one where there are three independent random variables $A$, $B$ and $H$, such that
I order to get the frequencies predicted by the quantum model one either needs to drop the assumption that $A$, $B$ and $H$ are independent or to modify the model such that, say, the result of the second measurement depends on both $A$ and $B$. (The latter is what the usual quantum mechanics formalism does; while also dispensing with $H$).
The various "loopholes" that have been proposed for Bell-inequality tests can generally be understood as proposals for physically plausible ways that two of the three variables might have a dependence in the particular experiment being considered.