I don't know how you know that the electrons have such and such spin
Electrons have both electric charge and spin (which is a form of angular momentum), and in combination, these two properties create an intrinsic magnetic moment. A magnetic field exerts torque on anything with a magnetic moment, which causes the electron to precess if it is subjected to such a field. Because spin is quantized and has only two possible values for electrons (+1/2 or -1/2), they will only precess in two discrete ways. This can be used to separate the electrons by their spin values. The first experiment to do this was the Stern-Gerlach experiment, a classic in the early development of QM, and often considered to be the discovery of spin.
Thanks.
In response to falenas108's "Ask an X" thread. I have a PhD in experimental particle physics; I'm currently working as a postdoc at the University of Cincinnati. Ask me anything, as the saying goes.
This is an experiment. There's nothing I like better than talking about what I do; but I usually find that even quite well-informed people don't know enough to ask questions sufficiently specific that I can answer any better than the next guy. What goes through most people's heads when they hear "particle physics" is, judging by experience, string theory. Well, I dunno nuffin' about string theory - at least not any more than the average layman who has read Brian Greene's book. (Admittedly, neither do string theorists.) I'm equally ignorant about quantum gravity, dark energy, quantum computing, and the Higgs boson - in other words, the big theory stuff that shows up in popular-science articles. For that sort of thing you want a theorist, and not just any theorist at that, but one who works specifically on that problem. On the other hand I'm reasonably well informed about production, decay, and mixing of the charm quark and charmed mesons, but who has heard of that? (Well, now you have.) I know a little about CP violation, a bit about detectors, something about reconstructing and simulating events, a fair amount about how we extract signal from background, and quite a lot about fitting distributions in multiple dimensions.