What are resources discussing the derivation of Bell's inequality? For a project, I'm planning to study Bell's inequality, which as far as I can gather is taken to rule out hidden variable theories of QM. I'm looking for recommendations of decent sources which derive the inequality, so I can get my head around the assumptions made and exactly where the inequality is applicable. I should add that I'm not looking for a "general outline" kind of source, I need something a bit more rigorous!
 A: Here is a simple and rigorous description. It says nothing about how and why QM sometimes gives results that are incompatible with hidden variables, but it makes it completely clear what it is that hidden variables can't do.
Understanding Bell's Theorem

The theorem is about explaining the statistics observed by two experimenters, Alice and Bob, that are making measurements on some physical system in a space-like separated way. The details of their experiment are not important for the theorem. What is important is that each experimenter has two possible settings, named 0 and 1, and for each setting the measurement has two possible outcomes, again named 0 and 1.


[....] Having their settings and outcomes defined like this, our experimenters measure some conditional probabilities $p(ab|xy)$, where $a,b$ are Alice and Bob’s outcomes, and $x,y$ are their settings. Now they want to explain these correlations. How did they come about?


Well, they obtained them by measuring some physical system $\lambda$ (that can be a quantum state, or something more exotic like a Bohmian corpuscle) that they did not have complete control over, so it is reasonable to write the probabilities as arising from an averaging over different values of $\lambda$. So they decompose the probabilities as


$p(ab|xy)=\sum p(\lambda|xy) p(ab|xy\lambda)$


The first assumption that we use in the proof is that the physical system $\lambda$ is not correlated with the settings $x$ and $y$, that is $p(\lambda|xy)=p(\lambda)$. I think this assumption is necessary to even do science, because if it were not possible to probe a physical system independently of its state, we couldn’t hope to be able to learn what its actual state is. It would be like trying to find a correlation between smoking and cancer when your sample of patients is chosen by a tobacco company.

And so on. Each probability step is simple and logical.
