Bell's original inequality in "Speakable and Unspeakable in Quantum Mechanics I'm having difficulty in understanding the setting for the derivation of Bell's inequality. The passage which sets the context below is from the beginning of the second essay in "Speakable and Unspeakable in Quantum Mechanics" by J.S. Bell. 

... Consider a pair of spin one-half particles formed somehow in the
  singlet spin state and moving freely in opposite directions.
  Measurements can be made, say by Stern-Gerlach magnets, on selected
  components of the spins $\sigma_1$ and $\sigma_2$. If measurement of
  the component $\sigma_1 \cdot a$ where $a$ is some unit vector, yields
  the value $+1$ then, according to quantum mechanics, measurement of
  $\sigma_2 \cdot a$ must yield the value $-1$ and vice versa. Now we
  make the hypothesis, and it seems at least one worth considering, that
  if the two measurements are made at places remote from one another the
  orientation of one magnet does not influence the result obtained with
  the other. Since we can predict in advance the result of measuring any
  chosen component of $\sigma_2$, by previously measuring the same
  component of $\sigma_1$, it follows that the result of any such
  measurement must actually be predetermined. Since the initial quantum
  mechanical wave function does not determine the result of an
  individual measurement, this predetermination implies the possibility
  of a more complete specification of the state.
Let this more complete specification be effected by means of a
  parameter $\lambda$. It is a matter of indifference in the following
  whether $\lambda$ denotes a single variable or a set, or even a set of
  functions, and whether the variables are discrete or continuous.
  However, we write as if $\lambda$ were a single continuous parameter.
  The result $A$ of measuring $\sigma_1 \cdot a$ is then determined by
  $a$ and $\lambda$, and the result $B$ of measuring $\sigma_2 \cdot b$
  in the same instance is determined by $b$ and $\lambda$, and
$A(a,\lambda)=\pm 1, B(b,\lambda)=\pm 1$ 
The vital assumption is that the result $B$ for particle 2 does not
  depend on the setting $a$, of the magnet for particle 1, nor $A$ on
  $b$. If $p(\lambda)$ is the probability distribution of $\lambda$ then
  the expectation value of the product of the two components $\sigma_1
\cdot a$ and $\sigma_2 \cdot b$ is
$P(a,b)=\int d\lambda p(\lambda)A(a,\lambda)B(b,\lambda)$
This should equal the quantum mechanical expectation value, which for
  the singlet state is
$\langle \sigma_1 \cdot a \sigma_2 \cdot b\rangle=-a\cdot b$
...

I have three questions:
Firstly, what is the meaning of $p(\lambda)$? $\lambda$ is a parameter (such as position in Bohmian mechanics). Does it just give the probability that a randomly selected system has a particular value of $\lambda$? That's the only way I can interpret it - $\lambda$ is meant to be predetermined.
Secondly, what within the framework of QM dictates that measurements of the components $\sigma_1\cdot a$ and $\sigma_2 \cdot a$ must be opposite? I'm not questioning the rule, I just want to know where it comes from.
Finally, how does the rule for the expectation value $\langle \sigma_1 \cdot a \sigma_2 \cdot b\rangle=-a\cdot b$ come about?
 A: The answers to your three questions are:
I) You should have better denoted the hidden parameter by, say, $\Lambda$ , and by ${λ}$ the set of his values. So, $p(λ)$ is the probability that the variable $\Lambda$ take the value $λ$.
II) The state named spin-singlet has the form
$$|S\rangle = \frac {|\uparrow\rangle |\downarrow\rangle - |\downarrow\rangle |\uparrow\rangle}{\sqrt {2}}. \tag{1}$$
The states $|\uparrow\rangle$ and $|\downarrow\rangle$ are the eigenstates of the operator $\hat {\sigma}_z$. However, if you choose another axis in space instead of $z$, the spin-projection eigenstates will transform, but the resulting singlet state will have an analogous form. For instance, if you prefer to pass from the axis $z$ to the axis $x$, the singlet becomes
$$|S\rangle = \frac {|\rightarrow\rangle |\leftarrow\rangle - |\leftarrow\rangle |\rightarrow\rangle}{\sqrt {2}}. \tag{2}$$
Here, instead of spin-up and spin-down, we have spin-to-the-right and spin-to-the-left. Thus, along whatever direction is space you measure the spin-projection of one particle, the spin-projection of the other particle is opposite.
III) As to your last question, the relation you seek is proved in a simple way in Ballentine's book "Quantum Mechanics" section 20-2 (Spin correlations). To put in short that proof, we choose to express the singlet in the eigenstates of $\hat {\sigma}_a$, let's name them $\begin{bmatrix}1 \\ 0\end{bmatrix}$ and $\begin{bmatrix}0 \\ 1\end{bmatrix}$. The operator $\hat {\sigma}_b$ has the form, $\begin{bmatrix} {cos\theta} & {sin\theta} \\ {sin\theta} & {-cos\theta}\end{bmatrix}$, where $\theta$ is the angle between the axes $\vec a$ and $\vec b$. 
So, there remains to calculate the expression
$$\frac {1}{2} \left( [1 \ 0] [0 \ 1] - [0 \ 1][1 \ 0] \right) \hat {\sigma}_b \left( \begin{bmatrix}1 \\ 0\end{bmatrix} \ \begin{bmatrix}0 \\ 1\end{bmatrix} - \begin{bmatrix}0 \\ 1\end{bmatrix} \ \begin{bmatrix}1 \\ 0\end{bmatrix} \right) \tag{3}$$
Since $\hat {\sigma}_b$ acts only on the 2nd vector in each product, what remains from the form $(3)$ is
$$ = \frac {1}{2} \left( [0 \ 1]\hat {\sigma}_b \begin{bmatrix}0 \\ 1\end{bmatrix} - [1 \ 0]\hat {\sigma}_b \begin{bmatrix}1 \\ 0\end{bmatrix} \right) = -cos\theta \tag{4}.$$
