Why do local hidden variable theories predict a triangular pattern for the graph? My friends and I got into an argument about determinism, and I brought up that quantum events are random. But I couldn't prove it.
I found the Wikipedia page on Bell's theorem, which seems to imply what I'm trying to show, because it disqualifying local hidden variable models. But I don't understand how the experiment works. I think I understand the steps taken:


*

*An electron-positron pair is produced, with opposite spins.

*Alice measures the spin of the electron along the x-axis.

*Bob measures the spin of the positron along some axis, which could be the x-axis.

*Alice and Bob compare their results, recording a +1 if their spins match, and a -1 if they do not.

*A graph of "angle between Alice and Bob's axes" vs. "sum of many trials" is created.


The part I don't get is: Why would local hidden variable theories predict a triangular pattern for the graph, and likewise, why would entanglement predict a cosine?
 A: Bell's theorem basically states that some predictions of quantum mechanics cannot be obtained from a local hidden variable model of the theory. Some people (like Nielsen and Chuang) refer to this as the fact that there cannot exist a local realist theory that has the same predictions as quantum mechanics.
Roughly speaking, a local theory is one in which systems that are space-like separated cannot influence each other. A realist theory is one in which the properties of systems have definite values, independent of measurements of them. Within this terminology, what you are trying to show to your friends is that quantum mechanics is not a realist theory, there is inherent uncertainty about the value of physical properties before they are measured.
But you see, Bell's theorem only formally tells us that we cannot have both realism and locality. However, it says nothing about keeping one but dropping the other. So, can there be a non-local realist model that makes the same predictions as quantum mechanics? Well yes there can!
An example is the Brohm-deBroglie interpretation of quantum mechanics, which you can learn more about if you are interested. The bottom line is that we cannot prove that the predictions of quantum mechanics imply that the properties of physical systems, like spin, are not determined before measurement, because we know that there is a theory in which they are determined that makes the same experimental predictions! 
A: As a note on the randomeness of quantum mechanics (though this might not be what you're directly asking in your question).
Time evolution of a state/system is perfectly deterministic in quantum mechanics. It's only measurements that give "random" results. In a certain perspective, that's an effective model for our ignorance of how measurements work (for eg: Steve Weinberg has been grappling with that for a while now). One of the ideas is that any measuring device is typically a macroscopic classical system and (roughly) decohorence turns a pure quantum state density matrix into a mixed state which gives a classical probability distribution over the possible outcomes of the measurement. 
Note: Some people try to make stochastic models of quantum mechanics, where QM is augmented with random variables, which makes those models non-deterministic. But that is beyond mainstream "core" quantum mechanics and is still to be tested.
A: Bell-KS theorem excludes the "non-contextual" hidden variable theories!
Even "local non-contextuality" which is a weaker variant of non-contextual HVTs are apparently forbidden.
BUT:
There are contextual hidden variable theories that are able to maintain determinism.
Read Mermin(1993), it's simple and elucidating.
