  It is shown that the Bell inequalities are closely related to the triangle
inequalities involving distance functions amongst pairs of random variables
with values $\left\{ 0,1\right\} $. A hidden variables model may be defined as
a mapping between a set of quantum projection operators and a set of random
variables. The model is noncontextual if there is a joint probability
distribution. The Bell inequalities are necessary conditions for its existence.
The inequalities are most relevant when measurements are performed at
space-like separation, thus showing a conflict between quantum mechanics and
local realism (Bell's theorem). The relations of the Bell inequalities with
contextuality, Kochen-Specker theorem, and quantum entanglement are briefly
discussed.
