Is there a general version of Bell's inequality, like the general version of uncertainty principle? By the general version of uncertainty principle, I mean the result involving general operators $A$ and $B$, which says that the products of standard deviations is equal to the sum of the expected value of the commutator plus the expected value of the anti-commutator (the result is not exactly this. I forgot the exact expression).
The Bell inequality is proved for spin measurements. Is there a general version of the inequality? Maybe something involving the commutator? I want to understand the key reason behind the weird correlations in Quantum mechanics. I think it might have to do with non-commutative observables, just like the uncertainty principle has to do with non commutativity
 A: Another way to interpret this question is to realise that the Bell/CHSH inequalities are indeed a special instance of a much more general formalism, where one can consider the set of all possible behaviours, that is, the set of possible conditional probability distributions between two parties: $\{p(ab|xy): a,b,x,y\}$, where $a,b$ represent possible measurement outcomes, and $x,y$ corresponding choices of measurements. What and how many values $a,b,x,y$ can take depends on the context; in the simplest scenario, they're all binary variables.
Then the fundamental observation is that the set of local realistic theories is a convex set in this space of behaviours, hence its boundarycan be characterised by linear inequalities. That is precisely what the CHSH inequality you might have seen is all about. A good way to see it is to realise that the $S$ operator you see in that context can be equivalently written as a linear combination of probabilities of the form
$$S\equiv \sum_{abxy} (-1)^{ab+x+y}p(ab|xy).$$
See this other answer of mine for more details on this.
In other words, the CHSH inequality corresponds to a (hyper-)plane separation, in this space of possible behaviours, between the set of local realistic theories and the other behaviours. In scenarios with only two inputs and two outputs, one can see the CHSH boundary is also the only nontrivial such boundary, so it's indeed quite "general" in this sense. The situation gets much richer as soon as you consider different scenarios (more inputs and/or more outputs), and you can get a whole bunch of inequalities that describe the set of local realistic behaviours in those instances.
It's worth noting a crucial difference between what "general" means here vs the uncertainty principle you're referring to. The uncertainty principle is a statement you can make about variances of any pair of observables: $\operatorname{Var}(A)\operatorname{Var}(B)\ge|\langle AB\rangle-\langle A\rangle \langle B\rangle|^2$ for any pair of Hermitian operators $A,B$. On the other hand, Bell inequalities, at least from the point of view I'm referring to here, are statements about whole theories. You don't associate a Bell inequality with an operator or set of operators. You associate a Bell inequality (or set of such inequalities) to bound the set of possible correlations a theory can produce. Where "theory" means here a loosely defined set of possible physical explanations (i.e. local realistic theories, or nonlocal theories, etc).
A: Probably the most generic statement about correlation that is still useful in this context is Tsirelson's bound for the CHSH inequality:
The setup are four observables $A_0,A_1,B_0,B_1$ with possible outcomes $\pm 1$ and $[A_i,B_j] = 0$ (but not, crucially, $[A_0,A_1] = 0$ or $[B_0,B_1] = 0$). This isn't as restrictive as it might seem because you can convert any observable with discrete spectrum into a family of such observables by just taking the projectors onto the eigenspaces of that observable and adding minus the projector onto the orthgonal complement to each projector, and likewise you can convert any experiment where you want to measure some quantity into a series of binary questions whether that quantity is in inside or outside some interval and then assign +1 to "inside" and -1 to "outside".
Then Tsirelson's bound says that the correlations of these observables are bounded as
$$ \sum_i \sum_j \langle A_i B_j\rangle \leq c$$
where $c = 2$ if $[A_0,A_1] = 0$ and $[B_0,B_1] = 0$ and $c = 2\sqrt{2}$ for the general case. The vanishing commutator corresponds to a classical local realist theory. Hence the proof of Tsirelson's bound shows us that the reason local realist theories cannot reproduce quantum mechanics indeed is that the commutativity of local realist observables places stricter bounds on correlation functions than general quantum theory.
